/** * Returns the launch configuration for which a default source lookup * path will be computed, or <code>null</code> if none. * * @return the launch configuration for which a default source lookup * path will be computed, or <code>null</code> */ protected ILaunchConfiguration getLaunchConfiguration() { ISourceLookupDirector director = getDirector(); if (director != null) { return director.getLaunchConfiguration(); } return null; }
@Override public Object[] findSourceElements(String name) throws CoreException { if (name == null) { return EMPTY; } // chrome-extension://ciinnplnpkjlnbjklingpjkakiapmmpm/foo/bar/baz.dart if (!name.startsWith(CHROME_PREFIX)) { return EMPTY; } String path = name.substring(CHROME_PREFIX.length()); if (path.indexOf('/') != -1) { path = path.substring(path.indexOf('/') + 1); } ILaunchConfiguration launch = getDirector().getLaunchConfiguration(); SDBGLaunchConfigWrapper wrapper = new SDBGLaunchConfigWrapper(launch); IResource launchResource = wrapper.getApplicationResource(); if (launchResource != null) { IContainer parent = launchResource.getParent(); IResource target = parent.findMember(path); if (target != null) { return new Object[] {target}; } } return EMPTY; }
@Override protected ISourceContainer[] createSourceContainers() throws CoreException { IRuntimeClasspathEntry entry = JavaRuntime.newRuntimeContainerClasspathEntry(getPath(), IRuntimeClasspathEntry.USER_CLASSES); IRuntimeClasspathEntry[] entries = JavaRuntime.resolveSourceLookupPath(new IRuntimeClasspathEntry[]{entry}, getDirector().getLaunchConfiguration()); return JavaRuntime.getSourceContainers(entries); }
@Override protected ISourceContainer[] createSourceContainers() throws CoreException { IRuntimeClasspathEntry entry = JavaRuntime.newRuntimeContainerClasspathEntry(getPath(), IRuntimeClasspathEntry.USER_CLASSES); IRuntimeClasspathEntry[] entries = JavaRuntime.resolveSourceLookupPath(new IRuntimeClasspathEntry[]{entry}, getDirector().getLaunchConfiguration()); return JavaRuntime.getSourceContainers(entries); }
/** * Returns the associated container or <code>null</code> if unavailable. * * @return classpath container or <code>null</code> * @throws CoreException if unable to retrieve container */ public IClasspathContainer getClasspathContainer() throws CoreException { ISourceLookupDirector director = getDirector(); if (director != null) { ILaunchConfiguration configuration = director.getLaunchConfiguration(); if (configuration != null) { IJavaProject project = JavaRuntime.getJavaProject(configuration); if (project != null) { return JavaCore.getClasspathContainer(getPath(), project); } } } return null; }
/** * Returns the associated container or <code>null</code> if unavailable. * * @return classpath container or <code>null</code> * @throws CoreException if unable to retrieve container */ public IClasspathContainer getClasspathContainer() throws CoreException { ISourceLookupDirector director = getDirector(); if (director != null) { ILaunchConfiguration configuration = director.getLaunchConfiguration(); if (configuration != null) { IJavaProject project = JavaRuntime.getJavaProject(configuration); if (project != null) { return JavaCore.getClasspathContainer(getPath(), project); } } } return null; }
@Override protected void okPressed() { ILaunchConfiguration config = fDirector.getLaunchConfiguration(); ILaunchConfigurationWorkingCopy copy = null; if(config != null) { try { copy = config.getWorkingCopy(); fPanel.performApply(copy); copy.doSave(); } catch (CoreException e) {DebugUIPlugin.log(e);} } super.okPressed(); }
/** * Initializes this control based on the settings in the given * AbstractSourceLookupDirector */ public void initializeFrom(ISourceLookupDirector locator) { if(fConfig == null) { fConfig = locator.getLaunchConfiguration(); } fPathViewer.setEntries(locator.getSourceContainers()); fDuplicatesButton.setSelection(locator.isFindDuplicates()); fLocator = locator; fAddAction.setSourceLookupDirector(locator); fEditAction.setSourceLookupDirector(locator); fRestoreDefaultAction.setSourceLookupDirector(locator); setDirty(false); }
fPanel.initializeFrom(fDirector); Dialog.applyDialogFont(composite); ILaunchConfiguration config = fDirector.getLaunchConfiguration(); if(config != null && config.isReadOnly()) { setErrorMessage(SourceLookupUIMessages.SourceLookupDialog_0+config.getName()+SourceLookupUIMessages.SourceLookupDialog_1);
ILaunchConfiguration configuration = director.getLaunchConfiguration(); if (configuration != null) { try {
if(configuration == null) { try { ILaunchConfiguration config = fLocator.getLaunchConfiguration(); if(config != null) { workingCopy = config.getWorkingCopy();