Package org.locationtech.udig.project.ui

Examples of org.locationtech.udig.project.ui.UDIGEditorInput


     *
     * @return Returns the map that this editor edits
     */
    public Map getMap() {
        // return viewer.getMap();
        UDIGEditorInput editorInput = (UDIGEditorInput) getEditorInput();
        if (editorInput != null) {
            return (Map) editorInput.getProjectElement();
        } else {
            return null;
        }
    }
View Full Code Here


     * @return the EditorInput
     * @throws CoreException
     */
    public UDIGEditorInput createInput( IProjectElement element ) {
        if (!instances.containsKey(element)) {
            UDIGEditorInput input;
            try {
                input = (UDIGEditorInput) extensionElement.createExecutableExtension("class"); //$NON-NLS-1$
                input.setEditorId(editorID);
            } catch (CoreException e) {
                ProjectUIPlugin.log("Error creating input type", e); //$NON-NLS-1$
                return null;
            } //$NON-NLS-1$
            input.setProjectElement(element);
            instances.put(element, input);
        }
        return (UDIGEditorInput) instances.get(element);

    }
View Full Code Here

                        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

         * @see java.lang.Runnable#run()
         */
        public void run() {
            // TODO Auto-generated method stub
            if (isMapOpen()) {
                UDIGEditorInput input = (UDIGEditorInput) PlatformUI.getWorkbench()
                        .getActiveWorkbenchWindow().getActivePage().getActiveEditor()
                        .getEditorInput();
                map = (Map) input.getProjectElement();
            }
        }
View Full Code Here

        try {
            if (PlatformUI.getWorkbench().isClosing())
                return;
           
            monitor.beginTask(Messages.OpenMapCommand_taskName, IProgressMonitor.UNKNOWN);
            final UDIGEditorInput input = ApplicationGIS.getInput(element);
//          if (element instanceof Map) {
//              Map map = (Map) element;
//              if (map.getViewportModel().getBounds().isNull()) {
//                  Envelope bounds = map.getBounds(monitor);
//                  map.getViewportModelInternal().setBounds(bounds);
//              }
//          }
            if (input == null) {
                return;
            }
            input.setProjectElement(element);

            PlatformGIS.syncInDisplayThread(new Runnable(){
                public void run() {
                    IWorkbenchPage activePage = PlatformUI.getWorkbench()
                            .getActiveWorkbenchWindow().getActivePage();
View Full Code Here

            previous.getEditorSite().getPage().activate(previous);
            return;
        }
        PlatformGIS.syncInDisplayThread(new Runnable(){
            public void run() {
                UDIGEditorInput input = ApplicationGIS.getInput(element);
                IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
                        .getActivePage();
                IEditorReference[] editors = activePage.getEditorReferences();
                List<IEditorReference> matches = new ArrayList<IEditorReference>();
                for( IEditorReference reference : editors ) {
View Full Code Here

     *
     * @return Returns the map that this editor edits
     */
    public Map getMap() {
        // return viewer.getMap();
        UDIGEditorInput editorInput = (UDIGEditorInput) getEditorInput();
        if (editorInput != null) {
            return (Map) editorInput.getProjectElement();
        } else {
            return null;
        }
    }
View Full Code Here

    }

    public void run() {
        Page page = null;
        IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
        UDIGEditorInput editorInput = (UDIGEditorInput) workbenchWindow.getActivePage()
                .getActiveEditor().getEditorInput();
        if (editorInput instanceof PageEditorInput) {
            page = (Page) ((PageEditorInput) editorInput).getProjectElement();
        }
        if (page == null) {
View Full Code Here

    }

    public void run() {
        Page page = null;
        IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
        UDIGEditorInput editorInput = (UDIGEditorInput) workbenchWindow.getActivePage()
                .getActiveEditor().getEditorInput();
        if (editorInput instanceof PageEditorInput) {
            page = (Page) ((PageEditorInput) editorInput).getProjectElement();
        }
        if (page == null) {
View Full Code Here

    public void run() {

        Page page = null;
        IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
        UDIGEditorInput editorInput = (UDIGEditorInput) workbenchWindow.getActivePage()
                .getActiveEditor().getEditorInput();
        if (editorInput instanceof PageEditorInput) {
            page = (Page) ((PageEditorInput) editorInput).getProjectElement();
        }
        if (page == null) {
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.ui.UDIGEditorInput

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.