Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 39614 Details for
Bug 138269
[Widgets] Add search-text sensitivity to NewComponentDialog
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
for "org.eclipse.wst.xsd.ui"
xsd_ui_sensitiveNewComponentName_2.txt (text/plain), 10.94 KB, created by
Trung
on 2006-04-26 19:22:32 EDT
(
hide
)
Description:
for "org.eclipse.wst.xsd.ui"
Filename:
MIME Type:
Creator:
Trung
Created:
2006-04-26 19:22:32 EDT
Size:
10.94 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.xsd.ui >Index: src-adt/org/eclipse/wst/xsd/ui/internal/adt/edit/IComponentDialog.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/xsd/plugins/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/edit/IComponentDialog.java,v >retrieving revision 1.1 >diff -u -r1.1 IComponentDialog.java >--- src-adt/org/eclipse/wst/xsd/ui/internal/adt/edit/IComponentDialog.java 11 Apr 2006 16:31:40 -0000 1.1 >+++ src-adt/org/eclipse/wst/xsd/ui/internal/adt/edit/IComponentDialog.java 24 Apr 2006 20:53:51 -0000 >@@ -20,7 +20,7 @@ > public void setInitialSelection(ComponentSpecification componentSpecification); > > /* >- * Return the Object which should be used as the type. >+ * Return the Object which should be used as the type/element. > */ > public ComponentSpecification getSelectedComponent(); > >Index: src-adt/org/eclipse/wst/xsd/ui/internal/adt/edit/ComponentReferenceEditManager.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/xsd/plugins/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/edit/ComponentReferenceEditManager.java,v >retrieving revision 1.1 >diff -u -r1.1 ComponentReferenceEditManager.java >--- src-adt/org/eclipse/wst/xsd/ui/internal/adt/edit/ComponentReferenceEditManager.java 11 Apr 2006 16:31:40 -0000 1.1 >+++ src-adt/org/eclipse/wst/xsd/ui/internal/adt/edit/ComponentReferenceEditManager.java 24 Apr 2006 20:53:51 -0000 >@@ -16,7 +16,11 @@ > public interface ComponentReferenceEditManager > { > public IComponentDialog getBrowseDialog(); >+ >+ /** @depreciated use IComponentDialog getNewDialog(null) instead. */ > public IComponentDialog getNewDialog(); >+ >+ public IComponentDialog getNewDialog(String newComponentInitialName); > public void modifyComponentReference(Object referencingObject, ComponentSpecification referencedComponent); > public IComponentDescriptionProvider getComponentDescriptionProvider(); > >Index: src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewTypeDialog.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/xsd/plugins/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewTypeDialog.java,v >retrieving revision 1.2 >diff -u -r1.2 NewTypeDialog.java >--- src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewTypeDialog.java 13 Apr 2006 07:09:49 -0000 1.2 >+++ src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewTypeDialog.java 24 Apr 2006 20:53:50 -0000 >@@ -39,6 +39,17 @@ > super(Display.getCurrent().getActiveShell(), Messages._UI_LABEL_NEW_TYPE, "NewType"); //$NON-NLS-1$ > } > >+ public NewTypeDialog(String initialName) >+ { >+ super(Display.getCurrent().getActiveShell(), Messages._UI_LABEL_NEW_TYPE, check(initialName) ); //$NON-NLS-1$ >+ } >+ >+ private static String check(String initialName) { >+ if (initialName == null) >+ return "NewType"; >+ return initialName; >+ } >+ > public int createAndOpen() > { > int returnCode = super.createAndOpen(); >Index: src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewElementButtonHandler.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/xsd/plugins/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewElementButtonHandler.java,v >retrieving revision 1.1 >diff -u -r1.1 NewElementButtonHandler.java >--- src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewElementButtonHandler.java 11 Apr 2006 16:31:51 -0000 1.1 >+++ src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewElementButtonHandler.java 24 Apr 2006 20:53:49 -0000 >@@ -18,9 +18,15 @@ > { > } > >- public void openNewComponentDialog() >+ public void openNewComponentDialog(String initialElementName) > { >- NewElementDialog newElementDialog = new NewElementDialog(); >- newElementDialog.createAndOpen(); >+ NewElementDialog newElementDialog = new NewElementDialog(initialElementName); >+ newElementDialog.createAndOpen(); >+ } >+ >+ public void openNewComponentDialog() >+ { >+ NewElementDialog newElementDialog = new NewElementDialog(); >+ newElementDialog.createAndOpen(); > } > } >Index: src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewComponentDialog.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/xsd/plugins/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewComponentDialog.java,v >retrieving revision 1.2 >diff -u -r1.2 NewComponentDialog.java >--- src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewComponentDialog.java 13 Apr 2006 07:09:49 -0000 1.2 >+++ src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewComponentDialog.java 24 Apr 2006 20:53:49 -0000 >@@ -35,7 +35,7 @@ > protected Label errorMessageLabel; > protected List usedNames; > >- public NewComponentDialog(Shell parentShell, String title, String defaultName) >+ protected NewComponentDialog(Shell parentShell, String title, String defaultName) > { > super(parentShell); > setShellStyle(getShellStyle() | SWT.RESIZE); >@@ -43,7 +43,7 @@ > this.title = title; > } > >- public NewComponentDialog(Shell parentShell, String title, String defaultName, List usedNames) >+ protected NewComponentDialog(Shell parentShell, String title, String defaultName, List usedNames) > { > super(parentShell); > setShellStyle(getShellStyle() | SWT.RESIZE); >Index: src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewTypeButtonHandler.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/xsd/plugins/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewTypeButtonHandler.java,v >retrieving revision 1.1 >diff -u -r1.1 NewTypeButtonHandler.java >--- src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewTypeButtonHandler.java 11 Apr 2006 16:31:51 -0000 1.1 >+++ src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewTypeButtonHandler.java 24 Apr 2006 20:53:49 -0000 >@@ -17,7 +17,13 @@ > public NewTypeButtonHandler() > { > } >- >+ >+ public void openNewComponentDialog(String initialTypeName) >+ { >+ NewTypeDialog newTypeDialog = new NewTypeDialog(initialTypeName); >+ newTypeDialog.createAndOpen(); >+ } >+ > public void openNewComponentDialog() > { > NewTypeDialog newTypeDialog = new NewTypeDialog(); >Index: src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewElementDialog.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/xsd/plugins/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewElementDialog.java,v >retrieving revision 1.2 >diff -u -r1.2 NewElementDialog.java >--- src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewElementDialog.java 13 Apr 2006 07:09:49 -0000 1.2 >+++ src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewElementDialog.java 24 Apr 2006 20:53:49 -0000 >@@ -27,7 +27,18 @@ > { > super(Display.getCurrent().getActiveShell(), Messages._UI_LABEL_NEW_ELEMENT, "NewElement"); //$NON-NLS-1$ > } >- >+ >+ public NewElementDialog(String initialElementName) >+ { >+ super(Display.getCurrent().getActiveShell(), Messages._UI_LABEL_NEW_ELEMENT, check(initialElementName)); //$NON-NLS-1$ >+ } >+ >+ private static String check(String initialElementName) { >+ if (initialElementName == null) >+ return "NewElement"; >+ return initialElementName; >+ } >+ > public int createAndOpen() > { > int returnCode = super.createAndOpen(); >Index: src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDElementReferenceEditManager.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/xsd/plugins/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDElementReferenceEditManager.java,v >retrieving revision 1.3 >diff -u -r1.3 XSDElementReferenceEditManager.java >--- src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDElementReferenceEditManager.java 19 Apr 2006 19:16:04 -0000 1.3 >+++ src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDElementReferenceEditManager.java 24 Apr 2006 20:53:50 -0000 >@@ -62,6 +62,11 @@ > return result; > } > >+ public IComponentDialog getNewDialog(String newElementInitialName) { >+ return new NewElementDialog(newElementInitialName); >+ } >+ >+ /** @depreciated use getNewDialog(null) instead. */ > public IComponentDialog getNewDialog() > { > return new NewElementDialog(); >Index: src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDTypeReferenceEditManager.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/xsd/plugins/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDTypeReferenceEditManager.java,v >retrieving revision 1.2 >diff -u -r1.2 XSDTypeReferenceEditManager.java >--- src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDTypeReferenceEditManager.java 13 Apr 2006 07:02:14 -0000 1.2 >+++ src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDTypeReferenceEditManager.java 24 Apr 2006 20:53:50 -0000 >@@ -72,6 +72,12 @@ > return result; > } > >+ public IComponentDialog getNewDialog(String newTypeInitialName) >+ { >+ return new NewTypeDialog(newTypeInitialName); >+ } >+ >+ /** @depreciated use getNewDialog(null) instead. */ > public IComponentDialog getNewDialog() > { > return new NewTypeDialog(); >Index: src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetTypeCommand.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/xsd/plugins/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetTypeCommand.java,v >retrieving revision 1.1 >diff -u -r1.1 SetTypeCommand.java >--- src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetTypeCommand.java 11 Apr 2006 16:31:35 -0000 1.1 >+++ src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetTypeCommand.java 24 Apr 2006 20:53:52 -0000 >@@ -51,7 +51,15 @@ > { > if (action.equals(SetTypeAction.SET_NEW_TYPE_ID)) > { >- ComponentSpecification newValue = (ComponentSpecification)invokeDialog(componentReferenceEditManager.getNewDialog()); >+ XSDElementDeclaration eleDec = (XSDElementDeclaration) parent; >+ String suggestedTypeName = eleDec.getName(); >+ // if the name is prefixed, take the local part only. >+ int i = suggestedTypeName.lastIndexOf(':'); >+ if (i > 0) >+ suggestedTypeName = suggestedTypeName.substring(i); >+ suggestedTypeName += "Type"; >+ >+ ComponentSpecification newValue = (ComponentSpecification)invokeDialog(componentReferenceEditManager.getNewDialog(suggestedTypeName)); > if (continueApply) > componentReferenceEditManager.modifyComponentReference(adapter, newValue); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
valentinbaciu
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 138269
:
39355
|
39356
| 39614