/** * Return true if the provided profile was derived from a target definition. */ public static boolean isDerivedFromTarget(IApiBaseline profile) { return profile.getLocation() != null && profile.getLocation().startsWith(ApiModelFactory.TARGET_PREFIX); }
/** * Return true if the provided profile is up-to-date with the given target * definition * * @param profile the API profile * @param definition the target definition * @return true if the profile is up-to-date */ public static boolean isUpToDateWithTarget(IApiBaseline profile, ITargetDefinition definition) { // The target's sequence number, if any, is generated into the location return profile.getLocation() != null && profile.getLocation().equals(generateTargetLocation(definition)); } }
public static boolean isApplicable(IApiBaseline profile) { String loc = profile.getLocation(); return loc != null && new Path(loc).toFile().exists(); }
String location = profile.getLocation();
root.setAttribute(IApiXmlConstants.ATTR_NAME, baseline.getName()); root.setAttribute(IApiXmlConstants.ATTR_VERSION, IApiXmlConstants.API_PROFILE_CURRENT_VERSION); String location = baseline.getLocation(); if (location != null) { root.setAttribute(IApiXmlConstants.ATTR_LOCATION, location);
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { IApiComponent[] components = original.getApiComponents(); IProgressMonitor localmonitor = SubMonitor.convert(monitor, WizardMessages.ApiProfileWizardPage_create_working_copy, components.length + 1); localmonitor.subTask(WizardMessages.ApiProfileWizardPage_copy_profile_attribs); workingcopy = ApiModelFactory.newApiBaseline(original.getName(), original.getLocation()); localmonitor.worked(1); localmonitor.subTask(WizardMessages.ApiProfileWizardPage_copy_api_components); ArrayList<IApiComponent> comps = new ArrayList<>(); IApiComponent comp = null; for (IApiComponent component : components) { comp = ApiModelFactory.newApiComponent(workingcopy, component.getLocation()); if (comp != null) { comps.add(comp); } localmonitor.worked(1); } workingcopy.addApiComponents(comps.toArray(new IApiComponent[comps.size()])); } catch (CoreException ce) { ApiUIPlugin.log(ce); } }
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { IApiComponent[] components = original.getApiComponents(); IProgressMonitor localmonitor = SubMonitor.convert(monitor, WizardMessages.ApiProfileWizardPage_create_working_copy, components.length + 1); localmonitor.subTask(WizardMessages.ApiProfileWizardPage_copy_profile_attribs); workingcopy = ApiModelFactory.newApiBaseline(original.getName(), original.getLocation()); localmonitor.worked(1); localmonitor.subTask(WizardMessages.ApiProfileWizardPage_copy_api_components); ArrayList comps = new ArrayList(); IApiComponent comp = null; for(int i = 0; i < components.length; i++) { comp = ApiModelFactory.newApiComponent(workingcopy, components[i].getLocation()); if(comp != null) { comps.add(comp); } localmonitor.worked(1); } workingcopy.addApiComponents((IApiComponent[]) comps.toArray(new IApiComponent[comps.size()])); } catch(CoreException ce) { ApiUIPlugin.log(ce); } }
return false; if (fProfile.getLocation() != null && !fProfile.getLocation().equals(locationcombo.getText())) { setErrorMessage(WizardMessages.ApiProfileWizardPage_location_needs_reset); return false;
IApiComponent[] components = fProfile.getApiComponents(); HashSet<String> locations = new HashSet<>(); String loc = fProfile.getLocation(); IPath location = null; if (loc != null) {
IApiComponent[] components = fProfile.getApiComponents(); HashSet locations = new HashSet(); String loc = fProfile.getLocation(); IPath location = null; if (loc != null) {
this.configuration.getAttribute(ApiUseLaunchDelegate.TARGET_SCOPE, (String)null), this.configuration.getAttribute(ApiUseLaunchDelegate.SEARCH_SCOPE, (String)null), baseline.getLocation(), xmlPath, sapi,
scrubReportLocation(new File(xmlPath), localmonitor.split(1)); UseMetadata data = new UseMetadata(kinds, this.configuration.getAttribute(ApiUseLaunchDelegate.TARGET_SCOPE, (String) null), this.configuration.getAttribute(ApiUseLaunchDelegate.SEARCH_SCOPE, (String) null), baseline.getLocation(), xmlPath, sapi, sinternal, sjars, this.configuration.getAttribute(ApiUseLaunchDelegate.FILTER_ROOT, (String) null), DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime()), this.configuration.getAttribute(ApiUseLaunchDelegate.DESCRIPTION, (String) null)); IApiSearchReporter reporter = new XmlSearchReporter(xmlPath, false); try {