Package org.eclipse.ui

Examples of org.eclipse.ui.IElementFactory.createElement()


        IElementFactory factory = PlatformUI.getWorkbench().getElementFactory(
                factoryId);

        if (factory != null) {
            IAdaptable adaptable = factory.createElement(memento);
            if (adaptable != null && (adaptable instanceof IEditorInput)) {
                return new EditorInputData(editorId, (IEditorInput) adaptable);
            }
        }
View Full Code Here


        if (factory == null) {
            WorkbenchPlugin
                    .log("Unable to restore working set - cannot instantiate factory: " + factoryID); //$NON-NLS-1$
            return null;
        }
        IAdaptable adaptable = factory.createElement(memento);
        if (adaptable == null) {
            WorkbenchPlugin
                    .log("Unable to restore working set - cannot instantiate working set: " + factoryID); //$NON-NLS-1$
            return null;
        }
View Full Code Here

        String factoryID = memento
                .getString(IWorkbenchConstants.TAG_FACTORY_ID);
        IElementFactory factory = PlatformUI.getWorkbench().getElementFactory(
                factoryID);
        if (factory != null) {
            IAdaptable element = factory.createElement(memento);
            if (element instanceof IEditorInput) {
                editorInput = (IEditorInput) element;
                editorID = memento.getString(IWorkbenchConstants.TAG_ID);
            }
        }
View Full Code Here

            if (factory == null) {
                throw new PartInitException(NLS.bind(WorkbenchMessages.EditorManager_bad_element_factory, new Object[] { factoryID, getId(), getName() }));
            }

            // Get the input element.
            input = factory.createElement(inputMem);
            if (input == null) {
                throw new PartInitException(NLS.bind(WorkbenchMessages.EditorManager_create_element_returned_null, new Object[] { factoryID, getId(), getName() }));
            }
        } finally {
            UIStats.end(UIStats.CREATE_PART_INPUT, input, label);
View Full Code Here

      if (factory == null) {
        WorkbenchPlugin
            .log("Unable to restore working set item - cannot instantiate factory: " + factoryID); //$NON-NLS-1$
        continue;
      }
      IAdaptable item = factory.createElement(itemMemento);
      if (item == null) {
        WorkbenchPlugin
            .log("Unable to restore working set item - cannot instantiate item: " + factoryID); //$NON-NLS-1$
        continue;
      }
View Full Code Here

                        .add(unableToRestorePage(pageMem));
                    return;
                  }

                  // Get the input element.
                  input[0] = factory.createElement(inputMem);
                }
              });
         
          if (input[0] == null) {
            WorkbenchPlugin
View Full Code Here

        if (persistableMemento == null) {
            WorkbenchPlugin
                    .log("Unable to restore mru list - no input element state: " + factoryId);//$NON-NLS-1$
            return result;
        }
        IAdaptable adaptable = factory.createElement(persistableMemento);
        if (adaptable == null || (adaptable instanceof IEditorInput) == false) {
            return result;
        }
        input = (IEditorInput) adaptable;
        // Get the editor descriptor.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.