diff options
author | Wim Jongman | 2014-01-17 23:28:42 +0000 |
---|---|---|
committer | Wim Jongman | 2014-01-17 23:28:42 +0000 |
commit | 79c04352c2eae001d58c55b688a1354afac5f573 (patch) | |
tree | e530477015e1b60a809c03621db982d49cce4a9c | |
parent | f51c0fa2ab48dbf860745e509d66b7db57f9665d (diff) | |
download | org.eclipse.e4.tools-79c04352c2eae001d58c55b688a1354afac5f573.tar.gz org.eclipse.e4.tools-79c04352c2eae001d58c55b688a1354afac5f573.tar.xz org.eclipse.e4.tools-79c04352c2eae001d58c55b688a1354afac5f573.zip |
Bug 426038 - Get rid of MInputPart
Support for this model element has been removed from the model.
Cleanup of NLS in RegistryUtil
Addition of Wizard image in ImportWizard
16 files changed, 146 insertions, 136 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/OSGI-INF/resources.properties b/bundles/org.eclipse.e4.tools.emf.ui/OSGI-INF/resources.properties index f4b07610..c8488e2b 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/OSGI-INF/resources.properties +++ b/bundles/org.eclipse.e4.tools.emf.ui/OSGI-INF/resources.properties @@ -104,6 +104,7 @@ IMG_org.eclipse.e4.tools.emf.ui.wizban.newclass_wiz=/icons/full/wizban/newclass_ IMG_org.eclipse.e4.tools.emf.ui.wizban.newexp_wiz=/icons/full/wizban/newexp_wiz.png IMG_org.eclipse.e4.tools.emf.ui.wizban.typerefact_wiz=/icons/full/wizban/typerefact_wiz.png IMG_org.eclipse.e4.tools.emf.ui.wizban.extstr_wiz=/icons/full/wizban/extstr_wiz.png +IMG_org.eclipse.e4.tools.emf.ui.wizban.imp3x_wiz=/icons/full/wizban/imp3x_wiz.png IMG_org.eclipse.e4.tools.emf.ui.widgets.ctabfolder_obj = /icons/full/widgets/ctabfolder_obj.gif IMG_org.eclipse.e4.tools.emf.ui.widgets.tabfolder_obj = /icons/full/widgets/tabfolder_obj.gif diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/imp3x_wiz.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/imp3x_wiz.png Binary files differnew file mode 100644 index 00000000..660e384b --- /dev/null +++ b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/imp3x_wiz.png diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties index 7e0e85a4..c328f210 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties @@ -404,7 +404,7 @@ WindowEditor_MainMenu=Main Menu WindowEditor_SelectedElement=Selected Element WindowEditor_BindingContexts=Binding Contexts WindowEditor_Handlers=Handlers -WindowEditor_Windows=Windows +WindowEditor_Windows=Windows and Dialogs WindowEditor_Controls=Controls WindowEditor_SharedElements=Shared Elements @@ -475,7 +475,7 @@ VWindowControlEditor_AddPart=Part VWindowControlEditor_AddInputPart=Input Part VWindowControlEditor_AddArea=Area -VWindowEditor_TreeLabel=Windows +VWindowEditor_TreeLabel=Windows and Dialogs VWindowEditor_TreeLabelDescription=Windows Bla Bla Bla Bla Bla VWindowEditor_Windows=Windows VWindowEditor_AddTrimmedWindow=Trimmed Window diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ResourceProvider.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ResourceProvider.java index 353ab2f3..48ecfb7b 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ResourceProvider.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ResourceProvider.java @@ -119,6 +119,7 @@ public class ResourceProvider extends BasicResourceProvider { public static final String IMG_Wizban16_newexp_wiz = "IMG_org.eclipse.e4.tools.emf.ui.wizban.newexp_wiz"; //$NON-NLS-1$ public static final String IMG_Wizban16_typerefact_wiz = "IMG_org.eclipse.e4.tools.emf.ui.wizban.typerefact_wiz"; //$NON-NLS-1$ public static final String IMG_Wizban16_extstr_wiz = "IMG_org.eclipse.e4.tools.emf.ui.wizban.extstr_wiz"; //$NON-NLS-1$ + public static final String IMG_Wizban16_imp3x_wiz = "IMG_org.eclipse.e4.tools.emf.ui.wizban.imp3x_wiz"; //$NON-NLS-1$ public static final String IMG_Widgets_ctabfolder_obj = "IMG_org.eclipse.e4.tools.emf.ui.widgets.ctabfolder_obj"; //$NON-NLS-1$ public static final String IMG_Widgets_tabfolder_obj = "IMG_org.eclipse.e4.tools.emf.ui.widgets.tabfolder_obj"; //$NON-NLS-1$ diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartSashContainerEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartSashContainerEditor.java index 083b982e..71f27ab6 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartSashContainerEditor.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartSashContainerEditor.java @@ -10,8 +10,6 @@ ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal.common.component; -import org.eclipse.jface.window.Window; - import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; @@ -33,7 +31,6 @@ import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl; import org.eclipse.e4.ui.model.application.ui.MElementContainer; import org.eclipse.e4.ui.model.application.ui.MUIElement; import org.eclipse.e4.ui.model.application.ui.advanced.impl.AdvancedPackageImpl; -import org.eclipse.e4.ui.model.application.ui.basic.MInputPart; import org.eclipse.e4.ui.model.application.ui.basic.MPart; import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainer; import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicPackageImpl; @@ -62,6 +59,7 @@ import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.window.Window; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CTabFolder; @@ -464,7 +462,7 @@ public class PartSashContainerEditor extends AbstractComponentEditor { protected void handleImportChild(EClass eClass, String hint) { if (eClass == BasicPackageImpl.Literals.PART) { - ModelImportWizard wizard = new ModelImportWizard(MPart.class, this, hint); + ModelImportWizard wizard = new ModelImportWizard(MPart.class, this, hint, resourcePool); WizardDialog wizardDialog = new WizardDialog(shell, wizard); if (wizardDialog.open() == Window.OK) { MPart[] parts = (MPart[]) wizard.getElements(MPart.class); @@ -473,17 +471,6 @@ public class PartSashContainerEditor extends AbstractComponentEditor { } } } - - if (eClass == BasicPackageImpl.Literals.INPUT_PART) { - ModelImportWizard wizard = new ModelImportWizard(MInputPart.class, this); - WizardDialog wizardDialog = new WizardDialog(shell, wizard); - if (wizardDialog.open() == Window.OK) { - MInputPart[] parts = (MInputPart[]) wizard.getElements(MInputPart.class); - for (MInputPart part : parts) { - addToModel((EObject) part); - } - } - } } @Override diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartStackEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartStackEditor.java index c8daab87..e36cddf6 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartStackEditor.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartStackEditor.java @@ -10,8 +10,6 @@ ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal.common.component; -import org.eclipse.jface.window.Window; - import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; @@ -58,6 +56,7 @@ import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.window.Window; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CTabFolder; @@ -404,7 +403,7 @@ public class PartStackEditor extends AbstractComponentEditor { protected void handleImportChild(EClass eClass) { if (eClass == BasicPackageImpl.Literals.PART) { - ModelImportWizard wizard = new ModelImportWizard(MPart.class, this); + ModelImportWizard wizard = new ModelImportWizard(MPart.class, this, resourcePool); WizardDialog wizardDialog = new WizardDialog(viewer.getControl().getShell(), wizard); if (wizardDialog.open() == Window.OK) { MPart[] parts = (MPart[]) wizard.getElements(MPart.class); @@ -415,11 +414,11 @@ public class PartStackEditor extends AbstractComponentEditor { } if (eClass == BasicPackageImpl.Literals.INPUT_PART) { - ModelImportWizard wizard = new ModelImportWizard(MInputPart.class, this); + ModelImportWizard wizard = new ModelImportWizard(MInputPart.class, this, resourcePool); WizardDialog wizardDialog = new WizardDialog(viewer.getControl().getShell(), wizard); if (wizardDialog.open() == Window.OK) { - MInputPart[] parts = (MInputPart[]) wizard.getElements(MInputPart.class); - for (MInputPart part : parts) { + MPart[] parts = (MPart[]) wizard.getElements(MInputPart.class); + for (MPart part : parts) { addToModel((EObject) part); } } diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PerspectiveStackEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PerspectiveStackEditor.java index 42b75f33..ea19e6b0 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PerspectiveStackEditor.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PerspectiveStackEditor.java @@ -10,8 +10,6 @@ ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal.common.component; -import org.eclipse.jface.window.Window; - import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; @@ -51,6 +49,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.window.Window; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CTabFolder; @@ -344,7 +343,7 @@ public class PerspectiveStackEditor extends AbstractComponentEditor { } protected void handleImportPerspective() { - ModelImportWizard wizard = new ModelImportWizard(MPerspective.class, this); + ModelImportWizard wizard = new ModelImportWizard(MPerspective.class, this, resourcePool); WizardDialog wizardDialog = new WizardDialog(shell, wizard); if (wizardDialog.open() == Window.OK) { MPerspective[] elements = (MPerspective[]) wizard.getElements(MPerspective.class); diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VApplicationCategoriesEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VApplicationCategoriesEditor.java index ed1c3d38..f7d1cc21 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VApplicationCategoriesEditor.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VApplicationCategoriesEditor.java @@ -10,8 +10,6 @@ ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal.common.component.virtual; -import org.eclipse.jface.window.Window; - import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; @@ -37,6 +35,7 @@ import org.eclipse.jface.databinding.viewers.ObservableListContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.window.Window; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CTabFolder; @@ -80,7 +79,7 @@ public class VApplicationCategoriesEditor extends AbstractComponentEditor { } protected void handleImport() { - ModelImportWizard wizard = new ModelImportWizard(MCategory.class, this); + ModelImportWizard wizard = new ModelImportWizard(MCategory.class, this, resourcePool); WizardDialog wizardDialog = new WizardDialog(viewer.getControl().getShell(), wizard); if (wizardDialog.open() == Window.OK) { MCategory[] elements = (MCategory[]) wizard.getElements(MCategory.class); diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VCommandEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VCommandEditor.java index 950cd5d7..7153fe2c 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VCommandEditor.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VCommandEditor.java @@ -10,8 +10,6 @@ ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal.common.component.virtual; -import org.eclipse.jface.window.Window; - import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; @@ -38,6 +36,7 @@ import org.eclipse.jface.databinding.viewers.ObservableListContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.window.Window; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CTabFolder; @@ -245,7 +244,7 @@ public class VCommandEditor extends AbstractComponentEditor { } protected void handleImport() { - ModelImportWizard wizard = new ModelImportWizard(MCommand.class, this); + ModelImportWizard wizard = new ModelImportWizard(MCommand.class, this, resourcePool); WizardDialog wizardDialog = new WizardDialog(viewer.getControl().getShell(), wizard); if (wizardDialog.open() == Window.OK) { MCommand[] elements = (MCommand[]) wizard.getElements(MCommand.class); diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VHandlerEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VHandlerEditor.java index 3db16793..5f0a49f2 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VHandlerEditor.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VHandlerEditor.java @@ -10,8 +10,6 @@ ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal.common.component.virtual; -import org.eclipse.jface.window.Window; - import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; @@ -37,6 +35,7 @@ import org.eclipse.jface.databinding.viewers.ObservableListContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.window.Window; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CTabFolder; @@ -246,7 +245,7 @@ public class VHandlerEditor extends AbstractComponentEditor { } protected void handleImport() { - ModelImportWizard wizard = new ModelImportWizard(MHandler.class, this); + ModelImportWizard wizard = new ModelImportWizard(MHandler.class, this, resourcePool); WizardDialog wizardDialog = new WizardDialog(viewer.getControl().getShell(), wizard); if (wizardDialog.open() == Window.OK) { MHandler[] elements = (MHandler[]) wizard.getElements(MHandler.class); diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VPartDescriptor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VPartDescriptor.java index 2242cd72..484f14ec 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VPartDescriptor.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VPartDescriptor.java @@ -10,8 +10,6 @@ ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal.common.component.virtual; -import org.eclipse.jface.window.Window; - import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; @@ -39,6 +37,7 @@ import org.eclipse.jface.databinding.viewers.ObservableListContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.window.Window; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CTabFolder; @@ -265,7 +264,7 @@ public class VPartDescriptor extends AbstractComponentEditor { protected void handleImport(EClass eClass, String hint) { if (eClass == BasicPackageImpl.Literals.PART_DESCRIPTOR) { - ModelImportWizard wizard = new ModelImportWizard(MPartDescriptor.class, this, hint); + ModelImportWizard wizard = new ModelImportWizard(MPartDescriptor.class, this, hint, resourcePool); WizardDialog wizardDialog = new WizardDialog(viewer.getControl().getShell(), wizard); if (wizardDialog.open() == Window.OK) { MPartDescriptor[] parts = (MPartDescriptor[]) wizard.getElements(MPartDescriptor.class); diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VSnippetsEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VSnippetsEditor.java index df4eac39..1709b863 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VSnippetsEditor.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VSnippetsEditor.java @@ -1,6 +1,8 @@ package org.eclipse.e4.tools.emf.ui.internal.common.component.virtual; import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; import java.util.List; import javax.annotation.PostConstruct; import org.eclipse.core.databinding.observable.list.IObservableList; @@ -57,28 +59,25 @@ public class VSnippetsEditor extends AbstractComponentEditor { @PostConstruct void init() { - actions.add(new Action(Messages.VWindowEditor_AddTrimmedWindow, createImageDescriptor(ResourceProvider.IMG_Window)) { - @Override - public void run() { - handleAdd(BasicPackageImpl.Literals.TRIMMED_WINDOW); - } - }); - actions.add(new Action(Messages.VWindowEditor_AddWindow, createImageDescriptor(ResourceProvider.IMG_Window)) { + + actions.add(new Action(Messages.VWindowControlEditor_AddArea, createImageDescriptor(ResourceProvider.IMG_Area_vertical)) { @Override public void run() { - handleAdd(BasicPackageImpl.Literals.WINDOW); + handleAdd(AdvancedPackageImpl.Literals.AREA); } }); - actions.add(new Action(Messages.VWindowControlEditor_AddPerspectiveStack, createImageDescriptor(ResourceProvider.IMG_PerspectiveStack)) { + + actions.add(new Action(Messages.VWindowEditor_AddDialog, createImageDescriptor(ResourceProvider.IMG_Dialog)) { @Override public void run() { - handleAdd(AdvancedPackageImpl.Literals.PERSPECTIVE_STACK); + handleAdd(BasicPackageImpl.Literals.DIALOG); } }); - actions.add(new Action(Messages.PerspectiveStackEditor_AddPerspective, createImageDescriptor(ResourceProvider.IMG_Perspective)) { + + actions.add(new Action(Messages.VWindowControlEditor_AddPart, createImageDescriptor(ResourceProvider.IMG_Part)) { @Override public void run() { - handleAdd(AdvancedPackageImpl.Literals.PERSPECTIVE); + handleAdd(BasicPackageImpl.Literals.PART); } }); @@ -96,24 +95,36 @@ public class VSnippetsEditor extends AbstractComponentEditor { } }); - actions.add(new Action(Messages.VWindowControlEditor_AddPart, createImageDescriptor(ResourceProvider.IMG_Part)) { + actions.add(new Action(Messages.VWindowControlEditor_AddPerspectiveStack, createImageDescriptor(ResourceProvider.IMG_PerspectiveStack)) { @Override public void run() { - handleAdd(BasicPackageImpl.Literals.PART); + handleAdd(AdvancedPackageImpl.Literals.PERSPECTIVE_STACK); + } + }); + actions.add(new Action(Messages.PerspectiveStackEditor_AddPerspective, createImageDescriptor(ResourceProvider.IMG_Perspective)) { + @Override + public void run() { + handleAdd(AdvancedPackageImpl.Literals.PERSPECTIVE); } }); - actions.add(new Action(Messages.VWindowControlEditor_AddInputPart, createImageDescriptor(ResourceProvider.IMG_Part)) { + actions.add(new Action(Messages.VTrimContributionsEditor_AddTrimContribution, createImageDescriptor(ResourceProvider.IMG_TrimContribution)) { @Override public void run() { - handleAdd(BasicPackageImpl.Literals.INPUT_PART); + handleAdd(BasicPackageImpl.Literals.TRIM_ELEMENT); } }); - actions.add(new Action(Messages.VWindowControlEditor_AddArea, createImageDescriptor(ResourceProvider.IMG_Area_vertical)) { + actions.add(new Action(Messages.VWindowEditor_AddTrimmedWindow, createImageDescriptor(ResourceProvider.IMG_Window)) { @Override public void run() { - handleAdd(AdvancedPackageImpl.Literals.AREA); + handleAdd(BasicPackageImpl.Literals.TRIMMED_WINDOW); + } + }); + actions.add(new Action(Messages.VWindowEditor_AddWindow, createImageDescriptor(ResourceProvider.IMG_Window)) { + @Override + public void run() { + handleAdd(BasicPackageImpl.Literals.WINDOW); } }); actions.add(new Action(Messages.VWindowTrimEditor_AddWindowTrim, createImageDescriptor(ResourceProvider.IMG_WindowTrim)) { @@ -122,10 +133,17 @@ public class VSnippetsEditor extends AbstractComponentEditor { handleAdd(BasicPackageImpl.Literals.TRIM_BAR); } }); - actions.add(new Action(Messages.VTrimContributionsEditor_AddTrimContribution, createImageDescriptor(ResourceProvider.IMG_TrimContribution)) { + actions.add(new Action(Messages.VWindowEditor_AddWizardDialog, createImageDescriptor(ResourceProvider.IMG_WizardDialog)) { @Override public void run() { - handleAdd(BasicPackageImpl.Literals.TRIM_ELEMENT); + handleAdd(BasicPackageImpl.Literals.WIZARD_DIALOG); + } + }); + + Collections.sort(actions, new Comparator<Action>() { + @Override + public int compare(Action o1, Action o2) { + return o1.getText().compareTo(o2.getText()); } }); diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowControlEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowControlEditor.java index de2ff8d4..2e56bda4 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowControlEditor.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowControlEditor.java @@ -11,6 +11,8 @@ package org.eclipse.e4.tools.emf.ui.internal.common.component.virtual; import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; import java.util.List; import javax.annotation.PostConstruct; import javax.inject.Inject; @@ -66,6 +68,7 @@ public class VWindowControlEditor extends AbstractComponentEditor { @PostConstruct void init() { + actions.add(new Action(Messages.VWindowControlEditor_AddPerspectiveStack, createImageDescriptor(ResourceProvider.IMG_PerspectiveStack)) { @Override public void run() { @@ -93,18 +96,17 @@ public class VWindowControlEditor extends AbstractComponentEditor { handleAdd(BasicPackageImpl.Literals.PART); } }); - - actions.add(new Action(Messages.VWindowControlEditor_AddInputPart, createImageDescriptor(ResourceProvider.IMG_Part)) { + actions.add(new Action(Messages.VWindowControlEditor_AddArea, createImageDescriptor(ResourceProvider.IMG_Area_vertical)) { @Override public void run() { - handleAdd(BasicPackageImpl.Literals.INPUT_PART); + handleAdd(AdvancedPackageImpl.Literals.AREA); } }); - actions.add(new Action(Messages.VWindowControlEditor_AddArea, createImageDescriptor(ResourceProvider.IMG_Area_vertical)) { + Collections.sort(actions, new Comparator<Action>() { @Override - public void run() { - handleAdd(AdvancedPackageImpl.Literals.AREA); + public int compare(Action o1, Action o2) { + return o1.getText().compareTo(o2.getText()); } }); } diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowSharedElementsEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowSharedElementsEditor.java index 1c60515c..aae768d2 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowSharedElementsEditor.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowSharedElementsEditor.java @@ -11,8 +11,6 @@ ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal.common.component.virtual; -import org.eclipse.jface.window.Window; - import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; @@ -28,7 +26,6 @@ import org.eclipse.e4.tools.emf.ui.internal.common.uistructure.ViewerElement; import org.eclipse.e4.tools.emf.ui.internal.imp.ModelImportWizard; import org.eclipse.e4.tools.emf.ui.internal.imp.RegistryUtil; import org.eclipse.e4.ui.model.application.ui.advanced.impl.AdvancedPackageImpl; -import org.eclipse.e4.ui.model.application.ui.basic.MInputPart; import org.eclipse.e4.ui.model.application.ui.basic.MPart; import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicPackageImpl; import org.eclipse.emf.common.command.Command; @@ -48,6 +45,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.StructuredViewer; +import org.eclipse.jface.window.Window; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CTabFolder; @@ -294,7 +292,7 @@ public class VWindowSharedElementsEditor extends AbstractComponentEditor { protected void handleImport(EClass eClass, String hint) { if (eClass == BasicPackageImpl.Literals.PART) { - ModelImportWizard wizard = new ModelImportWizard(MPart.class, this, hint); + ModelImportWizard wizard = new ModelImportWizard(MPart.class, this, hint, resourcePool); WizardDialog wizardDialog = new WizardDialog(viewer.getControl().getShell(), wizard); if (wizardDialog.open() == Window.OK) { MPart[] parts = (MPart[]) wizard.getElements(MPart.class); @@ -303,16 +301,6 @@ public class VWindowSharedElementsEditor extends AbstractComponentEditor { } } } - if (eClass == BasicPackageImpl.Literals.INPUT_PART) { - ModelImportWizard wizard = new ModelImportWizard(MInputPart.class, this, hint); - WizardDialog wizardDialog = new WizardDialog(viewer.getControl().getShell(), wizard); - if (wizardDialog.open() == Window.OK) { - MInputPart[] parts = (MInputPart[]) wizard.getElements(MInputPart.class); - for (MInputPart part : parts) { - addToModel((EObject) part); - } - } - } } @Override diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/ModelImportWizard.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/ModelImportWizard.java index b53e6ec3..134ab8c1 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/ModelImportWizard.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/ModelImportWizard.java @@ -14,8 +14,11 @@ package org.eclipse.e4.tools.emf.ui.internal.imp; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor; +import org.eclipse.e4.tools.emf.ui.internal.ResourceProvider; +import org.eclipse.e4.tools.services.IResourcePool; import org.eclipse.e4.ui.model.application.MApplication; import org.eclipse.e4.ui.model.application.MApplicationElement; +import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.wizard.Wizard; public class ModelImportWizard extends Wizard { @@ -30,16 +33,17 @@ public class ModelImportWizard extends Wizard { private final String hint; - public ModelImportWizard(Class<? extends MApplicationElement> applicationElement, AbstractComponentEditor editor) { - this(applicationElement, editor, ""); + public ModelImportWizard(Class<? extends MApplicationElement> applicationElement, AbstractComponentEditor editor, IResourcePool resourcePool) { + this(applicationElement, editor, "", resourcePool); } - public ModelImportWizard(Class<? extends MApplicationElement> applicationElement, AbstractComponentEditor editor, String hint) { + public ModelImportWizard(Class<? extends MApplicationElement> applicationElement, AbstractComponentEditor editor, String hint, IResourcePool resourcePool) { this.applicationElement = applicationElement; this.editor = editor; this.hint = hint; this.application = (MApplication) editor.getEditor().getModelProvider().getRoot().get(0); setWindowTitle("Model " + applicationElement.getSimpleName() + " Import Wizard"); + setDefaultPageImageDescriptor(ImageDescriptor.createFromImage(resourcePool.getImageUnchecked(ResourceProvider.IMG_Wizban16_imp3x_wiz))); Assert.isNotNull(RegistryUtil.getStruct(applicationElement, getHint()), "Unknown Element: " + applicationElement.getClass().getName()); } diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/RegistryUtil.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/RegistryUtil.java index 1d74bce1..b49b6a7a 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/RegistryUtil.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/RegistryUtil.java @@ -44,9 +44,25 @@ import org.osgi.framework.ServiceReference; public class RegistryUtil { - public final static String HINT_VIEW = "view"; - public final static String HINT_EDITOR = "editor"; - public final static String HINT_COMPAT_VIEW = "compatibilityView"; + private static final String PLATFORM = "platform:"; //$NON-NLS-1$ + private static final String EMPTY_STRING = ""; //$NON-NLS-1$ + private static final String COMMAND_ID = "commandId"; //$NON-NLS-1$ + private static final String CATEGORY_ID = "categoryId"; //$NON-NLS-1$ + private static final String COMPATIBILITY_VIEW = "bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView"; //$NON-NLS-1$ + private static final String VIEW_MENU = "ViewMenu"; //$NON-NLS-1$ + private static final String LAUNCHER = "launcher"; //$NON-NLS-1$ + private static final String EDITOR = "editor"; //$NON-NLS-1$ + private static final String VIEW = "View"; //$NON-NLS-1$ + private static final String CATEGORY_TAG = "categoryTag:"; //$NON-NLS-1$ + private static final String CATEGORY = "category"; //$NON-NLS-1$ + private static final String CLASS = "class"; //$NON-NLS-1$ + private static final String DESCRIPTION = "description"; //$NON-NLS-1$ + private static final String ICON = "icon"; //$NON-NLS-1$ + private static final String NAME = "name"; //$NON-NLS-1$ + private static final String ID = "id"; //$NON-NLS-1$ + public final static String HINT_VIEW = "view"; //$NON-NLS-1$ + public final static String HINT_EDITOR = EDITOR; + public final static String HINT_COMPAT_VIEW = "compatibilityView"; //$NON-NLS-1$ /** * @@ -94,10 +110,10 @@ public class RegistryUtil { for (IConfigurationElement element : elements) { MCommand command = commandsFactory.createCommand(); - command.setCommandName(element.getAttribute("name")); - command.setDescription(element.getAttribute("description")); - command.setElementId(element.getAttribute("id")); - String catId = element.getAttribute("categoryId"); + command.setCommandName(element.getAttribute(NAME)); + command.setDescription(element.getAttribute(DESCRIPTION)); + command.setElementId(element.getAttribute(ID)); + String catId = element.getAttribute(CATEGORY_ID); if (catId != null && catId.trim().length() > 0) { List<MCategory> categories = application.getCategories(); @@ -123,9 +139,9 @@ public class RegistryUtil { for (IConfigurationElement element : elements) { MPerspective perspective = factory.createPerspective(); - perspective.setLabel(element.getAttribute("name")); - perspective.setIconURI(getIconURI(element, "icon")); - perspective.setElementId(element.getAttribute("id")); + perspective.setLabel(element.getAttribute(NAME)); + perspective.setIconURI(getIconURI(element, ICON)); + perspective.setElementId(element.getAttribute(ID)); perspective.setToBeRendered(true); perspective.setVisible(true); result.add(perspective); @@ -143,9 +159,9 @@ public class RegistryUtil { for (IConfigurationElement element : elements) { MCategory category = commandsFactory.createCategory(); - category.setDescription(element.getAttribute("description")); - category.setElementId(element.getAttribute("id")); - category.setName(element.getAttribute("name")); + category.setDescription(element.getAttribute(DESCRIPTION)); + category.setElementId(element.getAttribute(ID)); + category.setName(element.getAttribute(NAME)); result.add(category); } @@ -158,23 +174,22 @@ public class RegistryUtil { ArrayList<MPart> result = new ArrayList<MPart>(); for (IConfigurationElement element : elements) { MPart part = (MPart) EcoreUtil.create(BasicPackageImpl.Literals.PART); - part.setElementId(element.getAttribute("id")); - part.setLabel(element.getAttribute("name")); - part.setIconURI(getIconURI(element, "icon")); - part.setContributionURI(getContributionURI(element, "class")); + part.setElementId(element.getAttribute(ID)); + part.setLabel(element.getAttribute(NAME)); + part.setIconURI(getIconURI(element, ICON)); + part.setContributionURI(getContributionURI(element, CLASS)); part.setToBeRendered(true); part.setVisible(true); part.setToolbar(createToolBar(part)); part.getMenus().add(createViewMenu(part)); part.setCloseable(true); - part.getTags().add("View"); - if (element.getAttribute("category") != null) { - part.getTags().add("categoryTag:" + element.getAttribute("category")); + part.getTags().add(VIEW); + if (element.getAttribute(CATEGORY) != null) { + part.getTags().add(CATEGORY_TAG + element.getAttribute(CATEGORY)); } result.add(part); } - return result.toArray(new MPart[0]); } @@ -187,7 +202,7 @@ public class RegistryUtil { private static MMenu createViewMenu(MPart part) { MMenu menu = MMenuFactory.INSTANCE.createMenu(); menu.setElementId(part.getElementId()); - menu.getTags().add("ViewMenu"); + menu.getTags().add(VIEW_MENU); return menu; } @@ -195,7 +210,7 @@ public class RegistryUtil { ArrayList<MPart> result = new ArrayList<MPart>(); MPart[] parts = getViews(elements); for (MPart part : parts) { - part.setContributionURI("bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView"); + part.setContributionURI(COMPATIBILITY_VIEW); result.add(part); } return result.toArray(new MPart[0]); @@ -205,18 +220,18 @@ public class RegistryUtil { ArrayList<MPartDescriptor> result = new ArrayList<MPartDescriptor>(); MPartDescriptor[] parts = getViewPartDescriptors(elements); for (MPartDescriptor part : parts) { - part.setContributionURI("bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView"); + part.setContributionURI(COMPATIBILITY_VIEW); result.add(part); } return result.toArray(new MPartDescriptor[0]); } - private static MInputPart[] getEditors(IConfigurationElement[] elements) { + private static MPart[] getEditors(IConfigurationElement[] elements) { - ArrayList<MInputPart> result = new ArrayList<MInputPart>(); + ArrayList<MPart> result = new ArrayList<MPart>(); for (IConfigurationElement element : elements) { if ("editor".equals(element.getName())) /* Sanity Check */{ - MInputPart part = (MInputPart) EcoreUtil.create(BasicPackageImpl.Literals.INPUT_PART); + MPart part = (MPart) EcoreUtil.create(BasicPackageImpl.Literals.PART); part.setElementId(element.getAttribute("id")); part.setLabel(element.getAttribute("name")); part.setIconURI(getIconURI(element, "icon")); @@ -234,7 +249,7 @@ public class RegistryUtil { } } - return result.toArray(new MInputPart[0]); + return result.toArray(new MPart[0]); } private static MPartDescriptor[] getEditorPartDescriptors(IConfigurationElement[] elements) { @@ -242,13 +257,13 @@ public class RegistryUtil { ArrayList<MPartDescriptor> result = new ArrayList<MPartDescriptor>(); for (IConfigurationElement element : elements) { MPartDescriptor part = (MPartDescriptor) EcoreUtil.create(org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl.Literals.PART_DESCRIPTOR); - part.setElementId(element.getAttribute("id")); - part.setLabel(element.getAttribute("name")); - part.setIconURI(getIconURI(element, "icon")); - if (element.getAttribute("class") != null) { - part.setContributionURI(getContributionURI(element, "class")); + part.setElementId(element.getAttribute(ID)); + part.setLabel(element.getAttribute(NAME)); + part.setIconURI(getIconURI(element, ICON)); + if (element.getAttribute(CLASS) != null) { + part.setContributionURI(getContributionURI(element, CLASS)); } else { - part.setContributionURI(getContributionURI(element, "launcher")); + part.setContributionURI(getContributionURI(element, LAUNCHER)); } part.setDirtyable(true); part.setAllowMultiple(true); @@ -259,7 +274,7 @@ public class RegistryUtil { MMenu menu = MMenuFactory.INSTANCE.createMenu(); menu.setElementId(part.getElementId()); - menu.getTags().add("ViewMenu"); + menu.getTags().add(VIEW_MENU); part.getMenus().add(menu); part.setCloseable(true); @@ -274,9 +289,9 @@ public class RegistryUtil { ArrayList<MPartDescriptor> result = new ArrayList<MPartDescriptor>(); for (IConfigurationElement element : elements) { MPartDescriptor part = (MPartDescriptor) EcoreUtil.create(org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl.Literals.PART_DESCRIPTOR); - part.setElementId(element.getAttribute("id")); - part.setLabel(element.getAttribute("name")); - part.setIconURI(getIconURI(element, "icon")); + part.setElementId(element.getAttribute(ID)); + part.setLabel(element.getAttribute(NAME)); + part.setIconURI(getIconURI(element, ICON)); MToolBar toolBar = MMenuFactory.INSTANCE.createToolBar(); toolBar.setElementId(part.getElementId()); @@ -284,7 +299,7 @@ public class RegistryUtil { MMenu menu = MMenuFactory.INSTANCE.createMenu(); menu.setElementId(part.getElementId()); - menu.getTags().add("ViewMenu"); + menu.getTags().add(VIEW_MENU); part.getMenus().add(menu); part.setCloseable(true); @@ -299,10 +314,10 @@ public class RegistryUtil { ArrayList<MHandler> result = new ArrayList<MHandler>(); for (IConfigurationElement element : elements) { MHandler hand = MCommandsFactory.INSTANCE.createHandler(); - hand.setElementId(element.getAttribute("id")); - hand.setContributionURI(getContributionURI(element, "class")); + hand.setElementId(element.getAttribute(ID)); + hand.setContributionURI(getContributionURI(element, CLASS)); - String cmdId = element.getAttribute("commandId"); + String cmdId = element.getAttribute(COMMAND_ID); if (cmdId != null && cmdId.trim().length() > 0) { List<MCommand> categories = application.getCommands(); @@ -320,17 +335,17 @@ public class RegistryUtil { private static String getIconURI(IConfigurationElement element, String attribute) { if (element.getAttribute(attribute) == null) { - return ""; + return EMPTY_STRING; } // FIXME any other cases? - if (element.getAttribute(attribute).startsWith("platform:")) { + if (element.getAttribute(attribute).startsWith(PLATFORM)) { return element.getAttribute(attribute); } - return "platform:/plugin/" + element.getContributor().getName() + "/" + element.getAttribute(attribute); + return "platform:/plugin/" + element.getContributor().getName() + "/" + element.getAttribute(attribute); //$NON-NLS-1$ //$NON-NLS-2$ } private static String getContributionURI(IConfigurationElement element, String attribute) { - return "bundleclass://" + element.getContributor().getName() + "/" + element.getAttribute(attribute); + return "bundleclass://" + element.getContributor().getName() + "/" + element.getAttribute(attribute); //$NON-NLS-1$ //$NON-NLS-2$ } /** @@ -346,7 +361,7 @@ public class RegistryUtil { IExtensionLookup service = getService(IExtensionLookup.class, null); if (service == null) { - return new String[] { "No " + IExtensionLookup.class.getName() + " service found." }; + return new String[] { "No " + IExtensionLookup.class.getName() + " service found." }; //$NON-NLS-1$ //$NON-NLS-2$ } ArrayList<String> result = new ArrayList<String>(); @@ -408,22 +423,22 @@ public class RegistryUtil { public static RegistryStruct getStruct(Class<? extends MApplicationElement> applicationElement, String hint) { if (applicationElement == MCommand.class) - return new RegistryStruct("", "org.eclipse.ui.commands", "command", "name"); + return new RegistryStruct(EMPTY_STRING, "org.eclipse.ui.commands", "command", NAME); //$NON-NLS-1$ //$NON-NLS-2$ else if (applicationElement == MCategory.class) - return new RegistryStruct("", "org.eclipse.ui.commands", "category", "name"); + return new RegistryStruct(EMPTY_STRING, "org.eclipse.ui.commands", CATEGORY, NAME); //$NON-NLS-1$ else if (applicationElement == MPerspective.class) - return new RegistryStruct("", "org.eclipse.ui.perspectives", "perspective", "name"); + return new RegistryStruct(EMPTY_STRING, "org.eclipse.ui.perspectives", "perspective", NAME); //$NON-NLS-1$ //$NON-NLS-2$ else if (applicationElement == MPart.class) - return new RegistryStruct("", "org.eclipse.ui.views", "view", "name"); + return new RegistryStruct(EMPTY_STRING, "org.eclipse.ui.views", "view", NAME); //$NON-NLS-1$ //$NON-NLS-2$ else if (applicationElement == MHandler.class) - return new RegistryStruct("", "org.eclipse.ui.handlers", "handler", "commandId"); + return new RegistryStruct(EMPTY_STRING, "org.eclipse.ui.handlers", "handler", COMMAND_ID); //$NON-NLS-1$ //$NON-NLS-2$ else if (applicationElement == MPart.class) { - return new RegistryStruct("", "org.eclipse.ui.views", "view", "name"); + return new RegistryStruct(EMPTY_STRING, "org.eclipse.ui.views", "view", NAME); //$NON-NLS-1$ //$NON-NLS-2$ } else if (applicationElement == MInputPart.class) { @@ -432,9 +447,9 @@ public class RegistryUtil { else if (applicationElement == MPartDescriptor.class) { if (hint == HINT_EDITOR) - return new RegistryStruct("", "org.eclipse.ui.editors", "editor", "name"); + return new RegistryStruct(EMPTY_STRING, "org.eclipse.ui.editors", EDITOR, NAME); //$NON-NLS-1$ if (hint == HINT_VIEW || hint == HINT_COMPAT_VIEW) - return new RegistryStruct("", "org.eclipse.ui.views", "view", "name"); + return new RegistryStruct(EMPTY_STRING, "org.eclipse.ui.views", "view", NAME); //$NON-NLS-1$ //$NON-NLS-2$ } return null; |