コード例 #1
0
 private void initProjectsAndMetamodels() {
   for (IProject project : ((INewRefactoringWizard) getWizard()).getProjects()) {
     projectCombo.add(project.getName());
   }
   Object[] metamodelObjects =
       EPackage.Registry.INSTANCE.keySet().toArray(new Object[EPackage.Registry.INSTANCE.size()]);
   Arrays.sort(metamodelObjects);
   for (Object object : metamodelObjects) {
     metamodelCombo.add(object.toString());
   }
 }
コード例 #2
0
    public RegisteredPackageDialog(final Shell parent) {
      super(
          parent,
          new LabelProvider() {
            @Override
            public Image getImage(final Object element) {
              return ExtendedImageRegistry.getInstance()
                  .getImage(
                      EcoreEditPlugin.INSTANCE.getImage("full/obj16/EPackage")); // $NON-NLS-1$
            }
          });

      setMultipleSelection(true);
      setMessage(Messages.Select_Registered_URI);
      setTitle(Messages.Package_Selection);
      Object[] result =
          EPackage.Registry.INSTANCE
              .keySet()
              .toArray(new Object[EPackage.Registry.INSTANCE.size()]);
      Arrays.sort(result);
      setElements(result);
    }
コード例 #3
0
 private void initMetaModels() {
   metaModels =
       EPackage.Registry.INSTANCE.keySet().toArray(new String[EPackage.Registry.INSTANCE.size()]);
   Arrays.sort(metaModels);
 }
コード例 #4
0
 protected void updateElements() {
   Object[] result =
       EPackage.Registry.INSTANCE.keySet().toArray(new Object[EPackage.Registry.INSTANCE.size()]);
   Arrays.sort(result);
   setListElements(result);
 }