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 118946 Details for
Bug 212326
WTP project creation wizards do not add the project to a working set.
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 v2
212326_patch.txt (text/plain), 6.64 KB, created by
Kaloyan Raev
on 2008-11-27 13:53:25 EST
(
hide
)
Description:
Patch v2
Filename:
MIME Type:
Creator:
Kaloyan Raev
Created:
2008-11-27 13:53:25 EST
Size:
6.64 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.web.ui >Index: static_web_ui/org/eclipse/wst/web/ui/internal/wizards/DataModelFacetCreationWizardPage.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/DataModelFacetCreationWizardPage.java,v >retrieving revision 1.34 >diff -u -r1.34 DataModelFacetCreationWizardPage.java >--- static_web_ui/org/eclipse/wst/web/ui/internal/wizards/DataModelFacetCreationWizardPage.java 9 Oct 2008 01:07:12 -0000 1.34 >+++ static_web_ui/org/eclipse/wst/web/ui/internal/wizards/DataModelFacetCreationWizardPage.java 27 Nov 2008 18:50:53 -0000 >@@ -19,6 +19,8 @@ > import java.util.SortedSet; > > import org.eclipse.jface.dialogs.IDialogSettings; >+import org.eclipse.jface.viewers.ISelection; >+import org.eclipse.jface.viewers.IStructuredSelection; > import org.eclipse.osgi.util.NLS; > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.SelectionAdapter; >@@ -32,7 +34,10 @@ > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Group; > import org.eclipse.swt.widgets.Shell; >+import org.eclipse.ui.IWorkingSet; > import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.dialogs.WorkingSetConfigurationBlock; >+import org.eclipse.ui.dialogs.WorkingSetGroup; > import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties; > import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent; > import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor; >@@ -67,9 +72,14 @@ > private static final String NULL_RUNTIME = "NULL_RUNTIME"; //$NON-NLS-1$ > private static final String MRU_RUNTIME_STORE = "MRU_RUNTIME_STORE"; //$NON-NLS-1$ > >+ private static final String RESOURCE_WORKING_SET = "org.eclipse.ui.resourceWorkingSetPage"; //$NON-NLS-1$ >+ private static final String JAVA_WORKING_SET = "org.eclipse.jdt.ui.JavaWorkingSetPage"; //$NON-NLS-1$ >+ > protected IProjectFacet primaryProjectFacet = null; > protected Combo primaryVersionCombo = null; > >+ protected WorkingSetGroup workingSetGroup; >+ > protected Set<IProjectFacetVersion> getFacetConfiguration( final IProjectFacetVersion primaryFacetVersion ) > { > final Set<IProjectFacetVersion> config = new HashSet<IProjectFacetVersion>(); >@@ -117,6 +127,7 @@ > createServerTargetComposite(top); > createPrimaryFacetComposite(top); > createPresetPanel(top); >+ createWorkingSetGroupPanel(top); > return top; > } > >@@ -629,4 +640,30 @@ > return null; > } > >+ protected WorkingSetGroup createWorkingSetGroup(Composite composite, >+ IStructuredSelection selection, String[] supportedWorkingSetTypes) { >+ if (workingSetGroup != null) >+ return workingSetGroup; >+ workingSetGroup = new WorkingSetGroup(composite, selection, >+ supportedWorkingSetTypes); >+ return workingSetGroup; >+ } >+ >+ protected WorkingSetGroup createWorkingSetGroupPanel(Composite composite) { >+ IStructuredSelection structuredSelection = null; >+ ISelection currentSelection = PlatformUI.getWorkbench() >+ .getActiveWorkbenchWindow().getSelectionService() >+ .getSelection(); >+ if (currentSelection instanceof IStructuredSelection) { >+ structuredSelection = (IStructuredSelection) currentSelection; >+ } >+ WorkingSetGroup group = createWorkingSetGroup(composite, structuredSelection, >+ new String[] { RESOURCE_WORKING_SET, JAVA_WORKING_SET }); >+ return group; >+ } >+ >+ public IWorkingSet[] getSelectedWorkingSets() { >+ return workingSetGroup == null ? new IWorkingSet[0] : workingSetGroup >+ .getSelectedWorkingSets(); >+ } > } >Index: static_web_ui/org/eclipse/wst/web/ui/internal/wizards/NewProjectDataModelFacetWizard.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/NewProjectDataModelFacetWizard.java,v >retrieving revision 1.49 >diff -u -r1.49 NewProjectDataModelFacetWizard.java >--- static_web_ui/org/eclipse/wst/web/ui/internal/wizards/NewProjectDataModelFacetWizard.java 12 May 2008 18:51:45 -0000 1.49 >+++ static_web_ui/org/eclipse/wst/web/ui/internal/wizards/NewProjectDataModelFacetWizard.java 27 Nov 2008 18:50:53 -0000 >@@ -17,6 +17,7 @@ > import java.util.Set; > > import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.resources.IProject; > import org.eclipse.core.resources.ResourcesPlugin; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IAdaptable; >@@ -32,6 +33,8 @@ > import org.eclipse.swt.widgets.Composite; > import org.eclipse.ui.INewWizard; > import org.eclipse.ui.IWorkbench; >+import org.eclipse.ui.IWorkingSet; >+import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; > import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; > import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties; >@@ -385,6 +388,21 @@ > * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizard#postPerformFinish() > */ > protected void postPerformFinish() throws InvocationTargetException { >+ String projName = getProjectName(); >+ IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projName); >+ IWorkbench workbench = WSTWebUIPlugin.getDefault().getWorkbench(); >+ >+ // add to the selected working sets >+ if (newProject != null && >+ beginingPages != null && >+ beginingPages.length > 0 && >+ beginingPages[0] instanceof DataModelFacetCreationWizardPage) { >+ DataModelFacetCreationWizardPage mainPage = (DataModelFacetCreationWizardPage) beginingPages[0]; >+ IWorkingSet[] workingSets = mainPage.getSelectedWorkingSets(); >+ workbench.getWorkingSetManager().addToWorkingSets(newProject, workingSets); >+ } >+ >+ // open the "final" perspective > if (getFinalPerspectiveID() != null && getFinalPerspectiveID().length() > 0) { > final IConfigurationElement element = new DelegateConfigurationElement(configurationElement) { > public String getAttribute(String aName) { >@@ -398,8 +416,8 @@ > } else > BasicNewProjectResourceWizard.updatePerspective(configurationElement); > >- String projName = getProjectName(); >- BasicNewResourceWizard.selectAndReveal(ResourcesPlugin.getWorkspace().getRoot().getProject(projName), WSTWebUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow()); >+ // select and reveal >+ BasicNewResourceWizard.selectAndReveal(newProject, workbench.getActiveWorkbenchWindow()); > } > > protected IDataModelOperation getFacetProjectNotificationOperation() {
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 212326
:
114415
| 118946