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 57069 Details for
Bug 161932
Use of internal packages in wsdm tooling tech preview
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for removing references from CodeGeneration UI in MRT
Patch_MRTCodeGen-161932.txt (text/plain), 11.82 KB, created by
Nalini V
on 2007-01-18 04:56:36 EST
(
hide
)
Description:
Patch for removing references from CodeGeneration UI in MRT
Filename:
MIME Type:
Creator:
Nalini V
Created:
2007-01-18 04:56:36 EST
Size:
11.82 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.wsdm.tooling.editor.mrt >Index: src/org/eclipse/tptp/wsdm/tooling/wizard/mrt/internal/GenerationOptionsPage.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.wsdm.tooling.editor.mrt/src/org/eclipse/tptp/wsdm/tooling/wizard/mrt/internal/GenerationOptionsPage.java,v >retrieving revision 1.7 >diff -u -r1.7 GenerationOptionsPage.java >--- src/org/eclipse/tptp/wsdm/tooling/wizard/mrt/internal/GenerationOptionsPage.java 27 Dec 2006 15:45:15 -0000 1.7 >+++ src/org/eclipse/tptp/wsdm/tooling/wizard/mrt/internal/GenerationOptionsPage.java 17 Jan 2007 12:35:30 -0000 >@@ -20,7 +20,6 @@ > import org.apache.muse.tools.generator.analyzer.Analyzer; > import org.apache.muse.tools.generator.projectizer.Projectizer; > import org.apache.muse.tools.generator.synthesizer.Synthesizer; >-import org.eclipse.core.filesystem.IFileInfo; > import org.eclipse.core.filesystem.URIUtil; > import org.eclipse.core.resources.IProject; > import org.eclipse.core.resources.IResource; >@@ -41,6 +40,7 @@ > import org.eclipse.jface.dialogs.DialogPage; > import org.eclipse.jface.dialogs.IDialogConstants; > import org.eclipse.jface.resource.ImageRegistry; >+import org.eclipse.jface.util.Util; > import org.eclipse.jface.viewers.ISelection; > import org.eclipse.jface.viewers.ISelectionChangedListener; > import org.eclipse.jface.viewers.IStructuredContentProvider; >@@ -50,7 +50,6 @@ > import org.eclipse.jface.viewers.TableViewer; > import org.eclipse.jface.viewers.Viewer; > import org.eclipse.jface.window.Window; >-import org.eclipse.jface.wizard.WizardDialog; > import org.eclipse.jface.wizard.WizardPage; > import org.eclipse.osgi.util.TextProcessor; > import org.eclipse.swt.SWT; >@@ -76,13 +75,6 @@ > import org.eclipse.tptp.wsdm.tooling.editor.mrt.internal.ManageableResourceTypeEditorPlugin; > import org.eclipse.tptp.wsdm.tooling.nls.messages.mrt.internal.Messages; > import org.eclipse.tptp.wsdm.tooling.util.internal.Validation; >-import org.eclipse.ui.internal.ide.IDEWorkbenchMessages; >-import org.eclipse.ui.internal.ide.dialogs.FileSystemSelectionArea; >-import org.eclipse.ui.internal.ide.dialogs.IDEResourceInfoUtils; >-import org.eclipse.ui.internal.ide.dialogs.ProjectContentsLocationArea; >-import org.eclipse.ui.internal.ide.dialogs.ProjectContentsLocationArea.IErrorMessageReporter; >-import org.eclipse.ui.internal.ide.filesystem.FileSystemConfiguration; >-import org.eclipse.ui.internal.ide.filesystem.FileSystemSupportRegistry; > > /** > * This wizard enables the use to specify the projectizer options and >@@ -96,10 +88,7 @@ > private Text _ddText; > private Text _projectNameField; > >- private ProjectContentsLocationArea _locationArea; >- private FileSystemSelectionArea _fileSystemSelectionArea; >- private IErrorMessageReporter _errorReporter; >- private String _userPath = IDEResourceInfoUtils.EMPTY_STRING; >+ private String _userPath = Util.ZERO_LENGTH_STRING;//IDEResourceInfoUtils.EMPTY_STRING; > > private Button _useDefaultsButton; > >@@ -207,9 +196,9 @@ > _projectNameField.setFont(parent.getFont()); > _projectNameField.addListener(SWT.Modify, nameModifyListener); > >- _errorReporter = getErrorReporter(); >+ //_errorReporter = getErrorReporter(); > _useDefaultsButton = new Button(page, SWT.CHECK | SWT.RIGHT); >- _useDefaultsButton.setText(IDEWorkbenchMessages.ProjectLocationSelectionDialog_useDefaultLabel); >+ _useDefaultsButton.setText(Messages.CODE_GEN_DEFAULT_LOCATION);//IDEWorkbenchMessages.ProjectLocationSelectionDialog_useDefaultLabel); > _useDefaultsButton.setSelection(true); > GridData buttonData = new GridData(); > buttonData.horizontalSpan = 2; >@@ -289,9 +278,6 @@ > _locationLabel.setEnabled(enabled); > _locationPathField.setEnabled(enabled); > _browseButton.setEnabled(enabled); >- if (_fileSystemSelectionArea != null) { >- _fileSystemSelectionArea.setEnabled(enabled); >- } > } > > private void createUserEntryArea(Composite composite, boolean defaultEnabled) { >@@ -318,13 +304,11 @@ > } > }); > >- createFileSystemSelection(composite); >- > if (defaultEnabled) { > _locationPathField.setText(TextProcessor.process(getDefaultPathDisplayString())); > } else { > if (_existingProject == null) { >- _locationPathField.setText(IDEResourceInfoUtils.EMPTY_STRING); >+ _locationPathField.setText(Util.ZERO_LENGTH_STRING);//IDEResourceInfoUtils.EMPTY_STRING); > } else { > _locationPathField.setText(TextProcessor.process(_existingProject > .getLocation().toString())); >@@ -338,41 +322,30 @@ > * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent) > */ > public void modifyText(ModifyEvent e) { >- _errorReporter.reportError(checkValidLocation()); >+ setErrorMessage(checkValidLocation()); > } > }); > } > > /** >- * Return the default location >+ * Returns whether the default location is selected or not. >+ * @return boolean > */ > public boolean isDefault() { > return _useDefaultsButton.getSelection(); > } > >- private FileSystemConfiguration getSelectedConfiguration() { >- if (_fileSystemSelectionArea == null) { >- return FileSystemSupportRegistry.getInstance() >- .getDefaultConfiguration(); >- } >- >- return _fileSystemSelectionArea.getSelectedConfiguration(); >- } >- >+ /** >+ * Returns the Project location URI >+ * @return java.net.URI >+ */ > public java.net.URI getProjectLocationURI() { >- >- FileSystemConfiguration configuration = getSelectedConfiguration(); >- if (configuration == null) { >- return null; >- } >- >- return configuration.getContributor().getURI( >- _locationPathField.getText()); >- >+ return URIUtil.toURI(_locationPathField.getText()); > } > > /** > * Check if the location is valid >+ * @return String > */ > public String checkValidLocation() { > >@@ -382,12 +355,12 @@ > > String locationFieldContents = _locationPathField.getText(); > if (locationFieldContents.length() == 0) { >- return (IDEWorkbenchMessages.WizardNewProjectCreationPage_projectLocationEmpty); >+ return (Messages.CODE_GEN_PROJECT_DIR);//IDEWorkbenchMessages.WizardNewProjectCreationPage_projectLocationEmpty); > } > > java.net.URI newPath = getProjectLocationURI(); > if (newPath == null) { >- return IDEWorkbenchMessages.ProjectLocationSelectionDialog_locationError; >+ return Messages.CODE_GEN_LOCATION_ERROR;//IDEWorkbenchMessages.ProjectLocationSelectionDialog_locationError; > } > > if (_existingProject == null) { >@@ -406,7 +379,7 @@ > > java.net.URI projectPath = _existingProject.getLocationURI(); > if (projectPath != null && URIUtil.equals(projectPath, newPath)) { >- return IDEWorkbenchMessages.ProjectLocationSelectionDialog_locationError; >+ return Messages.CODE_GEN_LOCATION_ERROR;//IDEWorkbenchMessages.ProjectLocationSelectionDialog_locationError; > } > } > >@@ -447,64 +420,15 @@ > String selectedDirectory = null; > String dirName = getPathFromLocationField(); > >- if (!dirName.equals(IDEResourceInfoUtils.EMPTY_STRING)) { >- IFileInfo info; >- info = IDEResourceInfoUtils.getFileInfo(dirName); >- >- if (info == null || !(info.exists())) >- dirName = IDEResourceInfoUtils.EMPTY_STRING; >- } >- >- FileSystemConfiguration config = getSelectedConfiguration(); >- if (config== null || config.equals( >- FileSystemSupportRegistry.getInstance() >- .getDefaultConfiguration())) { >- DirectoryDialog dialog = new DirectoryDialog(_locationPathField.getShell()); >- dialog.setMessage(IDEWorkbenchMessages.ProjectLocationSelectionDialog_directoryLabel); >- >- dialog.setFilterPath(dirName); >- >- selectedDirectory = dialog.open(); >- >- } else { >- java.net.URI uri = getSelectedConfiguration().getContributor() >- .browseFileSystem(dirName, _browseButton.getShell()); >- if (uri != null) >- selectedDirectory = uri.toString(); >- } >- >+ DirectoryDialog dialog = new DirectoryDialog(_locationPathField.getShell()); >+ dialog.setMessage(Messages.CODE_GEN_DIR_LOCATION);//IDEWorkbenchMessages.ProjectLocationSelectionDialog_directoryLabel); >+ dialog.setFilterPath(dirName); >+ selectedDirectory = dialog.open(); >+ > if (selectedDirectory != null) > updateLocationField(selectedDirectory); > } > >- /** >- * Create the file system selection area. >- * >- * @param composite >- */ >- private void createFileSystemSelection(Composite composite) { >- >- // Always use the default if that is all there is. >- if (FileSystemSupportRegistry.getInstance().hasOneFileSystem()) { >- return; >- } >- >- new Label(composite, SWT.NONE); >- >- _fileSystemSelectionArea = new FileSystemSelectionArea(); >- _fileSystemSelectionArea.createContents(composite); >- } >- >- >- >- private IErrorMessageReporter getErrorReporter() { >- return new IErrorMessageReporter(){ >- public void reportError(String errorMessage) { >- setErrorMessage(errorMessage); >- } >- }; >- } >- > private Listener nameModifyListener = new Listener() { > public void handleEvent(Event e) { > setLocationForSelection(); >@@ -634,11 +558,16 @@ > > /** > * Return the value of the output project >+ * @return String > */ > public String getProjectName() { > return _projectNameField.getText(); > } > >+ /** >+ * Returns if Overwrite button is enabled >+ * @return boolean >+ */ > public boolean isOverwrite() { > return _buttonOverwrite.isEnabled(); > } >@@ -676,6 +605,10 @@ > return null; > } > >+ /** >+ * Returns the base address >+ * @return String >+ */ > public String getBaseAddress() { > String name = _projectizerCombo.getText(); > String baseAddress = "http://localhost"; >#P org.eclipse.tptp.wsdm.tooling.validation >Index: src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/Messages.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.wsdm.tooling.validation/src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/Messages.java,v >retrieving revision 1.7 >diff -u -r1.7 Messages.java >--- src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/Messages.java 9 Jan 2007 19:52:25 -0000 1.7 >+++ src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/Messages.java 17 Jan 2007 12:35:32 -0000 >@@ -119,6 +119,10 @@ > public static String MRT_ERROR_CANNOT_LOAD_RES; > public static String MRT_ERROR_CANNOT_SERIALIZE; > public static String MRT_MAY_NOT_WORK_WITH_MAX; >+ public static String CODE_GEN_DEFAULT_LOCATION; >+ public static String CODE_GEN_PROJECT_DIR; >+ public static String CODE_GEN_LOCATION_ERROR; >+ public static String CODE_GEN_DIR_LOCATION; > > static { > NLS.initializeMessages(BUNDLE_NAME, Messages.class); >Index: src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/messages.properties >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.wsdm.tooling.validation/src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/messages.properties,v >retrieving revision 1.7 >diff -u -r1.7 messages.properties >--- src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/messages.properties 9 Jan 2007 19:52:25 -0000 1.7 >+++ src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/messages.properties 17 Jan 2007 12:35:32 -0000 >@@ -110,3 +110,7 @@ > MRT_ERROR_CANNOT_SERIALIZE = IWAT0674E Could not serialize Manageable Resource Type ! > PROJECT_EXISTS_WARNING = The project already exists > MRT_MAY_NOT_WORK_WITH_MAX = The Manageable Resource Type may not function as expected with Managed Agent Explorer if \"{0}\" is not included ! >+CODE_GEN_DEFAULT_LOCATION = Use default location >+CODE_GEN_PROJECT_DIR = Project contents directory must be specified >+CODE_GEN_LOCATION_ERROR = Invalid location path >+CODE_GEN_DIR_LOCATION = Select the location directory. >\ No newline at end of file
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
Actions:
View
|
Diff
Attachments on
bug 161932
:
52511
|
56198
| 57069 |
57084
|
57207
|
57493