@Override public IClasspathAttribute performRemove(ClasspathAttributeAccess attribute) { return JavaCore.newClasspathAttribute(IClasspathAttribute.EXTERNAL_ANNOTATION_PATH, null); } }
@Override public IClasspathAttribute performRemove(ClasspathAttributeAccess attribute) { return JavaCore.newClasspathAttribute(CPListElement.TEST, null); } }
@Override public IClasspathAttribute performRemove(ClasspathAttributeAccess attribute) { return JavaCore.newClasspathAttribute(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, null); } }
@Override public IClasspathAttribute performRemove(ClasspathAttributeAccess attribute) { return JavaCore.newClasspathAttribute(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, null); }
@Override public IClasspathAttribute performRemove(ClasspathAttributeAccess attribute) { return JavaCore.newClasspathAttribute(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, null); }
@Override public IClasspathAttribute performRemove(ClasspathAttributeAccess attribute) { return JavaCore.newClasspathAttribute(CPListElement.MODULE, null); } }
@Override public IClasspathAttribute performRemove(ClasspathAttributeAccess attribute) { return JavaCore.newClasspathAttribute(CPListElement.WITHOUT_TEST_CODE, null); } }
/** * Creates an IClasspathAttribute with the special WTP "org.eclipse.jst.component.nondependency" name. This attribute is * used on the resolved entries of classpath containers to prevent them from being exported/published. * @return The created IClasspathAttribute. * @throws CoreException Thrown if a problem is encountered. */ public static IClasspathAttribute createNonDependencyAttribute() throws CoreException { return JavaCore.newClasspathAttribute(IClasspathDependencyConstants.CLASSPATH_COMPONENT_NON_DEPENDENCY, ""); }
private static IClasspathAttribute[] setClasspathAttribute(IClasspathAttribute[] attributes, String name, String value) { for (int i = attributes.length; --i >= 0;) { if (name.equals(attributes[i].getName())) { IClasspathAttribute[] nw = Arrays.copyOf(attributes, attributes.length); nw[i] = JavaCore.newClasspathAttribute(name, value); return nw; } } IClasspathAttribute[] nw = Arrays.copyOf(attributes, attributes.length + 1); nw[attributes.length] = JavaCore.newClasspathAttribute(name, value); return nw; }
public void setAttributes(Iterable<? extends ClasspathAttribute> attributes) { List<ClasspathAttribute> attributeList = Lists.newArrayList(attributes); this.attributes = new IClasspathAttribute[attributeList.size()]; for (int i = 0; i < attributeList.size(); i++) { ClasspathAttribute attribute = attributeList.get(i); this.attributes[i] = JavaCore.newClasspathAttribute(attribute.getName(), attribute.getValue()); } }
@Override public IClasspathAttribute performEdit(Shell shell, ClasspathAttributeAccess attribute) { String initialValue= attribute.getClasspathAttribute().getValue(); String newValue= TRUE.equals(initialValue) ? null : TRUE; return JavaCore.newClasspathAttribute(CPListElement.TEST, newValue); }
@Override public IClasspathAttribute performEdit(Shell shell, ClasspathAttributeAccess attribute) { String initialValue= attribute.getClasspathAttribute().getValue(); String newValue= TRUE.equals(initialValue) ? null : TRUE; return JavaCore.newClasspathAttribute(CPListElement.WITHOUT_TEST_CODE, newValue); }
private static IClasspathAttribute[] getClasspathAttributes(IPluginModelBase model) { JavadocLocationManager manager = PDECore.getDefault().getJavadocLocationManager(); String location = manager.getJavadocLocation(model); if (location == null) return new IClasspathAttribute[0]; return new IClasspathAttribute[] {JavaCore.newClasspathAttribute(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, location)}; }
private static IClasspathAttribute[] getClasspathAttributes(IPluginModelBase model) { JavadocLocationManager manager = PDECore.getDefault().getJavadocLocationManager(); String location = manager.getJavadocLocation(model); if (location == null) return new IClasspathAttribute[0]; return new IClasspathAttribute[] {JavaCore.newClasspathAttribute(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, location)}; }
@Override public IClasspathAttribute performEdit(Shell shell, ClasspathAttributeAccess attribute) { String initialLocation= attribute.getClasspathAttribute().getValue(); IPath locationPath= initialLocation == null ? null : new Path(initialLocation); IPath newPath= BuildPathDialogAccess.configureExternalAnnotationsAttachment(shell, locationPath); if(null == newPath) // Was the dialog cancelled? return null; return JavaCore.newClasspathAttribute(IClasspathAttribute.EXTERNAL_ANNOTATION_PATH, newPath.segmentCount() == 0 ? null : newPath.toPortableString()); }
private static IClasspathAttribute[] getClasspathAttributes(IProject project, IPluginModelBase model) { IClasspathAttribute[] attributes = new IClasspathAttribute[0]; if (!RepositoryProvider.isShared(project)) { JavadocLocationManager manager = PDECore.getDefault().getJavadocLocationManager(); String javadoc = manager.getJavadocLocation(model); if (javadoc != null) { attributes = new IClasspathAttribute[] {JavaCore.newClasspathAttribute(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, javadoc)}; } } return attributes; }
@Override public IClasspathAttribute performEdit(Shell shell, ClasspathAttributeAccess attribute) { String initialLocation= attribute.getClasspathAttribute().getValue(); IPath locationPath= initialLocation == null ? null : new Path(initialLocation); IPath newPath= BuildPathDialogAccess.configureExternalAnnotationsAttachment(shell, locationPath); if(null == newPath) // Was the dialog cancelled? return null; return JavaCore.newClasspathAttribute(IClasspathAttribute.EXTERNAL_ANNOTATION_PATH, newPath.segmentCount() == 0 ? null : newPath.toPortableString()); }
public IClasspathAttribute performEdit(Shell shell, ClasspathAttributeAccess attribute) { NativeLibrariesDialog dialog= new NativeLibrariesDialog(shell, attribute.getClasspathAttribute().getValue(), attribute.getParentClasspassEntry()); if (dialog.open() == Window.OK) { return JavaCore.newClasspathAttribute(JavaRuntime.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY, dialog.getNativeLibraryPath()); } return null; }
@Override public IClasspathAttribute performEdit(Shell shell, ClasspathAttributeAccess attribute) { NativeLibrariesDialog dialog= new NativeLibrariesDialog(shell, attribute.getClasspathAttribute().getValue(), attribute.getParentClasspassEntry()); if (dialog.open() == Window.OK) { return JavaCore.newClasspathAttribute(JavaRuntime.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY, dialog.getNativeLibraryPath()); } return null; }
@Override public IClasspathAttribute performEdit(Shell shell, ClasspathAttributeAccess attribute) { NativeLibrariesDialog dialog= new NativeLibrariesDialog(shell, attribute.getClasspathAttribute().getValue(), attribute.getParentClasspassEntry()); if (dialog.open() == Window.OK) { return JavaCore.newClasspathAttribute(JavaRuntime.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY, dialog.getNativeLibraryPath()); } return null; }