@Override public synchronized IApiComponent getWorkspaceComponent(String symbolicName) { IApiBaseline baseline = getWorkspaceBaseline(); if (baseline != null) { return baseline.getApiComponent(symbolicName); } return null; } }
public static IApiComponent getStubApiComponent(int eeValue) { if (AllSystemLibraryApiComponents == null) { AllSystemLibraryApiComponents = new LinkedHashMap<>(); } String name = ProfileModifiers.getName(eeValue); IApiComponent component = AllSystemLibraryApiComponents.get(name); if (component == null) { // search if the corresponding stub file exists File stubFile = getFileFor(eeValue, name); if (stubFile == null) { return null; } component = new StubApiComponent(ApiBaselineManager.getManager().getWorkspaceBaseline(), stubFile.getAbsolutePath(), name); AllSystemLibraryApiComponents.put(name, component); } return component; }
/** * Returns the API component associated with this API description * * @return API component * @exception CoreException if the API component cannot be located */ private ProjectComponent getApiComponent() throws CoreException { IApiBaseline baseline = ApiBaselineManager.getManager().getWorkspaceBaseline(); ProjectComponent component = (ProjectComponent) baseline.getApiComponent(getJavaProject().getProject()); if (component == null) { throw new CoreException(new Status(IStatus.ERROR, ApiPlugin.PLUGIN_ID, "Unable to resolve project API component for API description")); //$NON-NLS-1$ } return component; }
component = ApiBaselineManager.getManager().getWorkspaceBaseline().getApiComponent(resource.getProject()); if (component instanceof ProjectComponent) { filters = map.get(component);
component = ApiBaselineManager.getManager().getWorkspaceBaseline().getApiComponent(resource.getProject()); if(component instanceof ProjectComponent) { filters = (HashSet) map.get(component);
/** * Scans the source and collects all of the changes in the given collector * * @param project the project to scan * @param collector the map to collect the edits in * @param remove if the old Javadoc tags should be removed as well * @param monitor the prgress monitor * @throws CoreException */ RefactoringStatus collectAnnotationEdits(IJavaProject project, Map<IFile, Set<TextEdit>> collector, boolean remove, IProgressMonitor monitor) throws CoreException { RefactoringStatus status = new RefactoringStatus(); IApiBaseline baseline = ApiBaselineManager.getManager().getWorkspaceBaseline(); if (baseline != null) { IApiComponent component = baseline.getApiComponent(project.getProject()); if (component != null) { IApiDescription description = component.getApiDescription(); AnnotVisitor visitor = new AnnotVisitor(project, component, description, remove, monitor); description.accept(visitor, null); collector.putAll(visitor.changes); } } return status; }
/** * resolves the {@link IApiProblemFilter} for the given marker * @param marker */ static IApiProblemFilter resolveFilter(IMarker marker) { try { String filterhandle = marker.getAttribute(IApiMarkerConstants.MARKER_ATTR_FILTER_HANDLE_ID, null); String[] values = filterhandle.split(ApiProblemFilter.HANDLE_DELIMITER); IProject project = marker.getResource().getProject(); IApiComponent component = ApiBaselineManager.getManager().getWorkspaceBaseline().getApiComponent(project); if(component != null) { IApiFilterStore store = component.getFilterStore(); IPath path = new Path(values[1]); IResource resource = project.findMember(path); if(resource == null) { resource = project.getFile(path); } int hashcode = ApiProblemFactory.getProblemHashcode(filterhandle); IApiProblemFilter[] filters = store.getFilters(resource); for (int i = 0; i < filters.length; i++) { if(filters[i].getUnderlyingProblem().hashCode() == hashcode) { return filters[i]; } } } } catch(CoreException ce) {} return null; }
/** * resolves the {@link IApiProblemFilter} for the given marker * * @param marker */ static IApiProblemFilter resolveFilter(IMarker marker) { try { String filterhandle = marker.getAttribute(IApiMarkerConstants.MARKER_ATTR_FILTER_HANDLE_ID, null); String[] values = filterhandle.split(ApiProblemFilter.HANDLE_DELIMITER); IProject project = marker.getResource().getProject(); IApiComponent component = ApiBaselineManager.getManager().getWorkspaceBaseline().getApiComponent(project); if (component != null) { IApiFilterStore store = component.getFilterStore(); IPath path = new Path(values[1]); IResource resource = project.findMember(path); if (resource == null) { resource = project.getFile(path); } int hashcode = ApiProblemFactory.getProblemHashcode(filterhandle); IApiProblemFilter[] filters = store.getFilters(resource); for (IApiProblemFilter filter : filters) { if (filter.getUnderlyingProblem().hashCode() == hashcode) { return filter; } } } } catch (CoreException ce) { } return null; }
System.out.println("processed REMOVED delta for package fragment: [" + fragment.getElementName() + "]"); //$NON-NLS-1$ //$NON-NLS-2$ ((ApiBaseline) bmanager.getWorkspaceBaseline()).clearPackage(fragment.getElementName());
Object[] selected=structuredSelection.toArray(); ApiScope scope = new ApiScope(); IApiBaseline workspaceBaseline = ApiBaselineManager.getManager().getWorkspaceBaseline(); if (workspaceBaseline == null) { return scope;
Object[] selected = structuredSelection.toArray(); ApiScope scope = new ApiScope(); IApiBaseline workspaceBaseline = ApiBaselineManager.getManager().getWorkspaceBaseline(); if (workspaceBaseline == null) { return scope;
int indexOfOpen = componentVersionId.lastIndexOf('('); String componentID = componentVersionId.substring(0, indexOfOpen); IApiBaseline baseline = ApiBaselineManager.getManager().getWorkspaceBaseline(); if (baseline != null) { IApiComponent apiComponent = baseline.getApiComponent(componentID);
int indexOfOpen = componentVersionId.lastIndexOf('('); String componentID = componentVersionId.substring(0, indexOfOpen); IApiBaseline baseline = ApiBaselineManager.getManager().getWorkspaceBaseline(); if (baseline != null) { IApiComponent apiComponent = baseline.getApiComponent(componentID);