Package org.eclipse.ui

Examples of org.eclipse.ui.IEditorInput


    icu2.createPackageDeclaration(pkg.getElementName(), monitor);

    if (openInEditor) {
      IFile input = (IFile) icu2.getResource();
      final IEditorInput editorInput = new FileEditorInput(input);
      final IEditorDescriptor desc = PlatformUI.getWorkbench()
          .getEditorRegistry().getDefaultEditor(input.getName());

      PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
        @Override
View Full Code Here


                null);

        icu2.createPackageDeclaration(pkg.getElementName(), null);

        IFile input = (IFile) icu2.getResource();
        final IEditorInput editorInput = new FileEditorInput(input);
        final IEditorDescriptor desc = PlatformUI.getWorkbench()
            .getEditorRegistry().getDefaultEditor(input.getName());

        PlatformUI.getWorkbench().getDisplay()
            .asyncExec(new Runnable() {
View Full Code Here

    }

    @SuppressWarnings("deprecation")
    private IFile[] getFiles(IWorkbenchPart each) {
        if (!(each instanceof IEditorPart)) return new IFile[] {};
        IEditorInput input = ((IEditorPart) each).getEditorInput();
        if (!(input instanceof IPathEditorInput)) return new IFile[] {};
        IPathEditorInput pathInput = (IPathEditorInput) input;
//      System.out.println(pathInput.getPath());
        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        return workspace.getRoot().findFilesForLocation(pathInput.getPath());
View Full Code Here

                // What we get from the treeViewer is a StructuredSelection
                StructuredSelection selection = ( StructuredSelection ) event.getSelection();

                // Here's the real object (an AttributeTypeWrapper, ObjectClassWrapper or IntermediateNode)
                Object objectSelection = selection.getFirstElement();
                IEditorInput input = null;
                String editorId = null;

                // Selecting the right editor and input
                if ( objectSelection instanceof SchemaErrorWrapper )
                {
View Full Code Here

                // What we get from the viewer is a StructuredSelection
                StructuredSelection selection = ( StructuredSelection ) event.getSelection();

                // Here's the real object (an AttributeTypeWrapper, ObjectClassWrapper or IntermediateNode)
                Object objectSelection = selection.getFirstElement();
                IEditorInput input = null;
                String editorId = null;

                // Selecting the right editor and input
                if ( objectSelection instanceof AttributeTypeWrapper )
                {
View Full Code Here

            if ( !selection.isEmpty() )
            {
                Object item = selection.getFirstElement();

                IEditorInput input = null;
                String editorId = null;

                // Here is the double clicked item
                if ( item instanceof AttributeTypeImpl )
                {
View Full Code Here

      logger.fine("GraphicalViewer initialized");
    }
  }

  private IDiagramElementsFactory getModel() {
    IEditorInput input = getEditorInput();
    if (input instanceof OnMemoryEditorInput) {
      return ((OnMemoryEditorInput) input).getModel();
    }
    return null;
  }
View Full Code Here

    setInput(getEditorInput());
  }
 
  @Override
  protected void doSetInput(final IEditorInput input) throws CoreException {
    final IEditorInput oldInput = getEditorInput();
    final ICasDocument oldDocument = getDocument();
   
    // Unregister the editor listeners on the old input
    // TODO: Should we make methods to encapsulate the register/unregister code?
    if (oldDocument != null) {
View Full Code Here

                                .getActiveWorkbenchWindow();
                        IEditorReference[] refs = window.getActivePage().getEditorReferences();
                        IMap map = ApplicationGIS.getActiveMap();

                        for( IEditorReference ref : refs ) {
                            IEditorInput input = ref.getEditorInput();
                            if (input instanceof UDIGEditorInput) {
                                UDIGEditorInput in = (UDIGEditorInput) input;
                                if (in.getProjectElement() == map) {
                                    editor.add(ref.getEditor(false));
                                    break;
View Full Code Here

            imageRegistry.put( key, image );
        }
        setDefaultPageImageDescriptor( image );       
       
        //get copy of map
        IEditorInput input = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
        .getActiveEditor().getEditorInput();
        map = (Map) ((MapEditorInput) input).getProjectElement();
       
        //get configuration for this wizard
        IBlackboard mapBlackboard = map.getBlackboard();
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IEditorInput

Copyright © 2018 www.massapicom. 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.