protected IWorkspace getWorkspace() { return PDECore.getWorkspace(); }
@Override protected void addListeners() { int event = IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.POST_CHANGE; PDECore.getWorkspace().addResourceChangeListener(this, event); }
private String getWorkspaceRelativePath(String path) { String workspacePath = PDECore.getWorkspace().getRoot().getLocation().toString(); if (path.startsWith(workspacePath)) path = path.replaceFirst(workspacePath, ""); //$NON-NLS-1$ return path; }
protected void addListeners() { int event = IResourceChangeEvent.PRE_CLOSE|IResourceChangeEvent.POST_CHANGE; PDECore.getWorkspace().addResourceChangeListener(this, event); }
private String getExpandedPath(String path) { if (path == null || path.length() == 0) return null; IResource resource = PDECore.getWorkspace().getRoot().findMember(new Path(path)); if (resource != null) { IPath fullPath = resource.getLocation(); return fullPath == null ? null : fullPath.toOSString(); } return null; }
private String getExpandedPath(String path) { if (path == null || path.length() == 0) return null; IResource resource = PDECore.getWorkspace().getRoot().findMember(new Path(path)); if (resource != null) { IPath fullPath = resource.getLocation(); return fullPath == null ? null : fullPath.toOSString(); } return null; }
private String getExpandedPath(String path) { if (path == null || path.length() == 0) return null; IResource resource = PDECore.getWorkspace().getRoot().findMember(new Path(path)); if (resource != null) { IPath fullPath = resource.getLocation(); return fullPath == null ? null : fullPath.toOSString(); } return null; }
/** * Removes listeners that the model manager attached on others, * as well as listeners attached on the model manager */ @Override protected void removeListeners() { PDECore.getWorkspace().removeResourceChangeListener(this); JavaCore.removePreProcessingResourceChangedListener(this); if (fExtensionListeners.size() > 0) fExtensionListeners.clear(); super.removeListeners(); }
@Override protected void removeListeners() { PDECore.getWorkspace().removeResourceChangeListener(this); super.removeListeners(); }
/** * Adds listeners to the workspace and to the java model * to be notified of PRE_CLOSE events and POST_CHANGE events. */ @Override protected void addListeners() { IWorkspace workspace = PDECore.getWorkspace(); workspace.addResourceChangeListener(this, IResourceChangeEvent.PRE_CLOSE); // PDE must process the POST_CHANGE events before the Java model // for the PDE container classpath update to proceed smoothly JavaCore.addPreProcessingResourceChangedListener(this, IResourceChangeEvent.POST_CHANGE); }
private void checkForProxyProject() { IWorkspaceRoot root = PDECore.getWorkspace().getRoot(); try { IProject project = root.getProject(SearchablePluginsManager.PROXY_PROJECT_NAME); if (!project.exists()) createProxyProject(new NullProgressMonitor()); } catch (CoreException e) { } }
/** * Adds listeners to the workspace and to the java model * to be notified of PRE_CLOSE events and POST_CHANGE events. */ protected void addListeners() { IWorkspace workspace = PDECore.getWorkspace(); workspace.addResourceChangeListener(this, IResourceChangeEvent.PRE_CLOSE); // PDE must process the POST_CHANGE events before the Java model // for the PDE container classpath update to proceed smoothly JavaCore.addPreProcessingResourceChangedListener(this, IResourceChangeEvent.POST_CHANGE); }
protected void removeListeners() { PDECore.getWorkspace().removeResourceChangeListener(this); super.removeListeners(); }
protected synchronized void initialize() { if (fModels != null) return; fModels = Collections.synchronizedMap(new HashMap()); IProject[] projects = PDECore.getWorkspace().getRoot().getProjects(); for (int i = 0; i < projects.length; i++) { if (isInterestingProject(projects[i])) createModel(projects[i], false); } addListeners(); }
protected synchronized void initialize() { if (fModels != null) return; fModels = Collections.synchronizedMap(new HashMap<IProject, IModel>()); IProject[] projects = PDECore.getWorkspace().getRoot().getProjects(); for (int i = 0; i < projects.length; i++) { if (isInterestingProject(projects[i])) createModel(projects[i], false); } addListeners(); }
/** * Removes listeners that the model manager attached on others, * as well as listeners attached on the model manager */ protected void removeListeners() { PDECore.getWorkspace().removeResourceChangeListener(this); JavaCore.removePreProcessingResourceChangedListener(this); super.removeListeners(); }
public SearchablePluginsManager getSearchablePluginsManager() { if (fSearchablePluginsManager == null) { fSearchablePluginsManager = new SearchablePluginsManager(); try { getWorkspace().addSaveParticipant(inst, fSearchablePluginsManager); } catch (CoreException e) { log(e); } } return fSearchablePluginsManager; }
public IJavaProject getProxyProject() { IWorkspaceRoot root = PDECore.getWorkspace().getRoot(); IProject project = root.getProject(PROXY_PROJECT_NAME); try { if (project.exists() && project.isOpen() && project.hasNature(JavaCore.NATURE_ID)) { return JavaCore.create(project); } } catch (CoreException e) { } return null; }
public IJavaProject getProxyProject() { IWorkspaceRoot root = PDECore.getWorkspace().getRoot(); IProject project = root.getProject(PROXY_PROJECT_NAME); try { if (project.exists() && project.isOpen() && project.hasNature(JavaCore.NATURE_ID)) { return JavaCore.create(project); } } catch (CoreException e) { } return null; }
private IFile createSiteManifest() { IPath fFilePath = fPath.append(fFileName); IFile categoryFile = PDECore.getWorkspace().getRoot().getFile(fFilePath); if (categoryFile.exists()) return categoryFile; WorkspaceSiteModel model = new WorkspaceSiteModel(categoryFile); model.getSite(); // Save the model model.save(); model.dispose(); // Set the default editor IDE.setDefaultEditor(categoryFile, IPDEUIConstants.CATEGORY_EDITOR_ID); return categoryFile; }