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 118198 Details for
Bug 254970
[ds tooling] Service Component wizard: Persist "File name" field
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]
DSWizard and WizardPage updates
org.eclipse.pde.ds.ui.174.patch (text/plain), 3.87 KB, created by
Rafael Oliveira Nóbrega
on 2008-11-18 17:11:42 EST
(
hide
)
Description:
DSWizard and WizardPage updates
Filename:
MIME Type:
Creator:
Rafael Oliveira Nóbrega
Created:
2008-11-18 17:11:42 EST
Size:
3.87 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ds.ui >Index: src/org/eclipse/pde/internal/ds/ui/wizards/DSNewWizard.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/wizards/DSNewWizard.java,v >retrieving revision 1.7 >diff -u -r1.7 DSNewWizard.java >--- src/org/eclipse/pde/internal/ds/ui/wizards/DSNewWizard.java 11 Nov 2008 21:14:42 -0000 1.7 >+++ src/org/eclipse/pde/internal/ds/ui/wizards/DSNewWizard.java 18 Nov 2008 22:11:01 -0000 >@@ -14,11 +14,13 @@ > > import java.lang.reflect.InvocationTargetException; > >+import org.eclipse.jface.dialogs.IDialogSettings; > import org.eclipse.jface.operation.IRunnableWithProgress; > import org.eclipse.jface.viewers.IStructuredSelection; > import org.eclipse.jface.wizard.Wizard; > import org.eclipse.pde.internal.ds.ui.Activator; > import org.eclipse.pde.internal.ds.ui.Messages; >+import org.eclipse.pde.internal.ui.PDEPlugin; > import org.eclipse.ui.INewWizard; > import org.eclipse.ui.IWorkbench; > >@@ -40,6 +42,7 @@ > > public void init(IWorkbench workbench, IStructuredSelection currentSelection) { > setWindowTitle(Messages.DSNewWizard_title); >+ setDialogSettings(PDEPlugin.getDefault().getDialogSettings()); > fMainPage = new DSFileWizardPage(currentSelection); > } > >@@ -50,7 +53,10 @@ > */ > public boolean performFinish() { > try { >- >+ IDialogSettings settings = getDialogSettings(); >+ if (settings != null) { >+ fMainPage.saveSettings(settings); >+ } > IRunnableWithProgress op = new DSCreationOperation(fMainPage > .createNewFile(), fMainPage.getDSComponentNameValue(), > fMainPage.getDSImplementationClassValue()); >Index: src/org/eclipse/pde/internal/ds/ui/wizards/DSFileWizardPage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/wizards/DSFileWizardPage.java,v >retrieving revision 1.10 >diff -u -r1.10 DSFileWizardPage.java >--- src/org/eclipse/pde/internal/ds/ui/wizards/DSFileWizardPage.java 11 Nov 2008 21:14:42 -0000 1.10 >+++ src/org/eclipse/pde/internal/ds/ui/wizards/DSFileWizardPage.java 18 Nov 2008 22:11:01 -0000 >@@ -27,6 +27,7 @@ > import org.eclipse.jdt.internal.ui.packageview.ClassPathContainer; > import org.eclipse.jdt.ui.IJavaElementSearchConstants; > import org.eclipse.jdt.ui.JavaUI; >+import org.eclipse.jface.dialogs.IDialogSettings; > import org.eclipse.jface.viewers.IStructuredSelection; > import org.eclipse.jface.window.Window; > import org.eclipse.jface.wizard.WizardDialog; >@@ -64,7 +65,9 @@ > > private static final String F_FILE_EXTENSION = "xml"; //$NON-NLS-1$ > >- private static final String F_COMPONENT_NAME = "component.xml"; //$NON-NLS-1$ >+ private static final String F_DEFAULT_COMPONENT_NAME = "component.xml"; //$NON-NLS-1$ >+ >+ private static final String S_COMPONENT_NAME = "component"; //$NON-NLS-1$ > > private Group fGroup; > >@@ -93,7 +96,6 @@ > setDescription(Messages.DSFileWizardPage_description); > // Force the file extension to be 'xml' > setFileExtension(F_FILE_EXTENSION); >- setFileName(F_COMPONENT_NAME); > } > > private void setComponentName() { >@@ -134,6 +136,17 @@ > } > > protected void createAdvancedControls(Composite parent) { >+ IDialogSettings settings = getDialogSettings(); >+ if (settings != null) { >+ String component = settings.get(S_COMPONENT_NAME); >+ if (component != null && !component.equals("")) { >+ setFileName(component); >+ } else { >+ setFileName(F_DEFAULT_COMPONENT_NAME); >+ } >+ } else { >+ setFileName(F_DEFAULT_COMPONENT_NAME); >+ } > > // Controls Group > fGroup = new Group(parent, SWT.NONE); >@@ -312,4 +325,11 @@ > return checkPageComplete(); > } > >+ public void saveSettings(IDialogSettings settings) { >+ settings.put(S_COMPONENT_NAME, getFileName()); >+ >+ } >+ >+ >+ > }
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:
caniszczyk
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 254970
: 118198 |
119818