Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 164083 Details for
Bug 307996
Add a UI for running API migration scans
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
org.eclipse.pde.api.tools.ui.patch
clipboard.txt (text/plain), 64.63 KB, created by
Chris Aniszczyk
on 2010-04-07 12:13:05 EDT
(
hide
)
Description:
org.eclipse.pde.api.tools.ui.patch
Filename:
MIME Type:
Creator:
Chris Aniszczyk
Created:
2010-04-07 12:13:05 EDT
Size:
64.63 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.api.tools.ui >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.ui/META-INF/MANIFEST.MF,v >retrieving revision 1.21 >diff -u -r1.21 MANIFEST.MF >--- META-INF/MANIFEST.MF 4 Mar 2010 17:07:01 -0000 1.21 >+++ META-INF/MANIFEST.MF 7 Apr 2010 16:12:23 -0000 >@@ -32,6 +32,7 @@ > org.eclipse.pde.api.tools.ui.internal.actions;x-friends:="org.eclipse.pde.api.tools.tests", > org.eclipse.pde.api.tools.ui.internal.completion;x-friends:="org.eclipse.pde.api.tools.tests", > org.eclipse.pde.api.tools.ui.internal.markers;x-friends:="org.eclipse.pde.api.tools.tests", >+ org.eclipse.pde.api.tools.ui.internal.migration;x-internal:=true, > org.eclipse.pde.api.tools.ui.internal.preferences;x-friends:="org.eclipse.pde.api.tools.tests", > org.eclipse.pde.api.tools.ui.internal.properties;x-friends:="org.eclipse.pde.api.tools.tests", > org.eclipse.pde.api.tools.ui.internal.refactoring;x-internal:=true, >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.ui/plugin.properties,v >retrieving revision 1.20 >diff -u -r1.20 plugin.properties >--- plugin.properties 17 Aug 2009 21:32:03 -0000 1.20 >+++ plugin.properties 7 Apr 2010 16:12:23 -0000 >@@ -36,4 +36,6 @@ > FilterMoveParticipant.name = API Problem Filter Move Participant > CompareWithMenu.label=Compare With > LaunchConfigurationType.name=API Use Report >-LaunchConfigurationTabGroup.name=Creates an API use scan report >\ No newline at end of file >+LaunchConfigurationTabGroup.name=Creates an API use scan report >+MigrationLaunchConfigurationType.name=API Migration Report >+MigrationLaunchConfigurationTabGroup.name=Creates an API migration scan report >\ No newline at end of file >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.ui/plugin.xml,v >retrieving revision 1.26 >diff -u -r1.26 plugin.xml >--- plugin.xml 20 Jan 2010 22:04:46 -0000 1.26 >+++ plugin.xml 7 Apr 2010 16:12:23 -0000 >@@ -477,6 +477,15 @@ > name="%LaunchConfigurationType.name" > public="true"> > </launchConfigurationType> >+ <launchConfigurationType >+ category="org.eclipse.ui.externaltools" >+ delegate="org.eclipse.pde.api.tools.ui.internal.migration.ApiMigrationLaunchDelegate" >+ delegateName="%MigrationLaunchConfigurationType.name" >+ id="org.eclipse.pde.api.tools.migrationscan" >+ modes="run" >+ name="%MigrationLaunchConfigurationType.name" >+ public="true"> >+ </launchConfigurationType> > </extension> > <extension > point="org.eclipse.debug.ui.launchConfigurationTabGroups"> >@@ -486,6 +495,12 @@ > id="org.eclipse.pde.api.tools.usescan.tabgroup" > type="org.eclipse.pde.api.tools.usescan"> > </launchConfigurationTabGroup> >+ <launchConfigurationTabGroup >+ class="org.eclipse.pde.api.tools.ui.internal.migration.ApiMigrationTabGroup" >+ description="%MigrationLaunchConfigurationTabGroup.name" >+ id="org.eclipse.pde.api.tools.migrationscan.tabgroup" >+ type="org.eclipse.pde.api.tools.migrationscan"> >+ </launchConfigurationTabGroup> > </extension> > <extension > point="org.eclipse.debug.ui.launchConfigurationTypeImages"> >@@ -494,5 +509,10 @@ > icon="$nl$/icons/full/obj16/category_menu.gif" > id="org.eclipse.pde.api.tools.usescan.image"> > </launchConfigurationTypeImage> >+ <launchConfigurationTypeImage >+ configTypeID="org.eclipse.pde.api.tools.migrationscan" >+ icon="$nl$/icons/full/obj16/category_menu.gif" >+ id="org.eclipse.pde.api.tools.migrationscan.image"> >+ </launchConfigurationTypeImage> > </extension> > </plugin> >Index: src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationLaunchDelegate.java >=================================================================== >RCS file: src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationLaunchDelegate.java >diff -N src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationLaunchDelegate.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationLaunchDelegate.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,112 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 Red Hat and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Chris Aniszczyk <caniszczyk@gmail.com> - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.pde.api.tools.ui.internal.migration; >+ >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.debug.core.DebugPlugin; >+import org.eclipse.debug.core.ILaunch; >+import org.eclipse.debug.core.ILaunchConfiguration; >+import org.eclipse.debug.core.model.LaunchConfigurationDelegate; >+import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin; >+ >+/** >+ * Delegate to launch an API migration scan >+ */ >+public class ApiMigrationLaunchDelegate extends LaunchConfigurationDelegate { >+ >+ public static final String PREFIX = ApiUIPlugin.PLUGIN_ID + ".migration"; //$NON-NLS-1$ >+ >+ /** >+ * The source of bundles being searched - one of target definition, API baseline, or installation path. >+ */ >+ public static final String TARGET_KIND = PREFIX + ".TARGET_KIND"; //$NON-NLS-1$ >+ >+ /** >+ * Sources of bundles (possible values for BUNDLE_SOURCE). >+ */ >+ public static final int KIND_TARGET_DEFINITION = 1; >+ public static final int KIND_API_BASELINE = 2; >+ public static final int KIND_INSTALL_PATH = 3; >+ public static final int KIND_HTML_ONLY = 4; >+ >+ /** >+ * Target definition handle >+ */ >+ public static final String TARGET_HANDLE = PREFIX + ".TARGET_HANDLE"; //$NON-NLS-1$ >+ public static final String BASELINE_NAME = PREFIX + ".BASELINE_NAME"; //$NON-NLS-1$ >+ public static final String INSTALL_PATH = PREFIX + ".INSTALL_PATH"; //$NON-NLS-1$ >+ >+ /** >+ * Addition/overrides to API descriptions. Lists of package patterns to indicate >+ * internal or API references. >+ */ >+ public static final String INTERNAL_PATTERNS_LIST = PREFIX + ".INTERNAL_PATTERNS_LIST"; //$NON-NLS-1$ >+ public static final String API_PATTERNS_LIST = PREFIX + ".API_PATTERNS_LIST"; //$NON-NLS-1$ >+ public static final String JAR_PATTERNS_LIST = PREFIX + ".JAR_PATTERNS_LIST"; //$NON-NLS-1$ >+ public static final String REPORT_PATTERNS_LIST = PREFIX + ".REPORT_PATTERNS_LIST"; //$NON-NLS-1$ >+ public static final String REPORT_TO_PATTERNS_LIST = PREFIX + ".TO_PATTERNS_LIST"; //$NON-NLS-1$ >+ /** >+ * Scope of bundles to search - a regular expression to match against bundle symbolic names. >+ * Unspecified indicates all bundles in the bundle source. >+ */ >+ public static final String SEARCH_SCOPE = PREFIX + ".SEARCH_SCOPE"; //$NON-NLS-1$ >+ >+ /** >+ * Scope of bundles to search for references to. Unspecified indicates all bundles. >+ */ >+ public static final String TARGET_SCOPE = PREFIX + ".TARGET_SCOPE"; //$NON-NLS-1$ >+ >+ /** >+ * Search modifiers >+ */ >+ public static final String SEARCH_MODIFIERS = PREFIX + ".SEARCH_MODIFIERS"; //$NON-NLS-1$ >+ >+ /** >+ * Path to root directory of XML reports >+ */ >+ public static final String REPORT_PATH = PREFIX + ".XML_PATH"; //$NON-NLS-1$ >+ >+ /** >+ * Path to root directory of the usage scan >+ */ >+ public static final String USAGE_SCAN_PATH = PREFIX + ".USAGE_SCAN_PATH"; //$NON-NLS-1$ >+ >+ /** >+ * Human-readable description of the report >+ */ >+ public static final String DESCRIPTION = PREFIX + ".DESCRIPTION"; //$NON-NLS-1$ >+ >+ /** >+ * Search modifiers >+ */ >+ public static final int CLEAN_XML = 1 << 2; >+ public static final int CLEAN_HTML = 1 << 3; >+ public static final int CREATE_HTML = 1 << 4; >+ public static final int DISPLAY_REPORT = 1 << 5; >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor) >+ */ >+ public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { >+ ApiMigrationScanJob job = new ApiMigrationScanJob(configuration); >+ job.schedule(); >+ DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#buildForLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.core.runtime.IProgressMonitor) >+ */ >+ public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException { >+ return false; >+ } >+ >+} >Index: src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationScanJob.java >=================================================================== >RCS file: src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationScanJob.java >diff -N src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationScanJob.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationScanJob.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,484 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 Red Hat and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Chris Aniszczyk <caniszczyk@gmail.com> - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.pde.api.tools.ui.internal.migration; >+ >+import java.io.File; >+import java.util.ArrayList; >+import java.util.HashSet; >+import java.util.List; >+import java.util.Set; >+import java.util.TreeSet; >+import java.util.regex.Pattern; >+ >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.OperationCanceledException; >+import org.eclipse.core.runtime.Path; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.core.runtime.SubMonitor; >+import org.eclipse.core.runtime.URIUtil; >+import org.eclipse.core.runtime.jobs.Job; >+import org.eclipse.debug.core.ILaunchConfiguration; >+import org.eclipse.osgi.service.resolver.ResolverError; >+import org.eclipse.osgi.util.NLS; >+import org.eclipse.pde.api.tools.internal.ApiBaselineManager; >+import org.eclipse.pde.api.tools.internal.model.ApiModelFactory; >+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin; >+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline; >+import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent; >+import org.eclipse.pde.api.tools.internal.search.MigrationReportConvertor; >+import org.eclipse.pde.api.tools.internal.search.ReferenceLookupVisitor; >+import org.eclipse.pde.api.tools.internal.search.SkippedComponent; >+import org.eclipse.pde.api.tools.internal.search.UseScanParser; >+import org.eclipse.pde.api.tools.internal.util.Util; >+import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin; >+import org.eclipse.pde.api.tools.ui.internal.use.ApiUseLaunchDelegate; >+import org.eclipse.pde.internal.core.target.provisional.IBundleContainer; >+import org.eclipse.pde.internal.core.target.provisional.IResolvedBundle; >+import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition; >+import org.eclipse.pde.internal.core.target.provisional.ITargetHandle; >+import org.eclipse.pde.internal.core.target.provisional.ITargetPlatformService; >+import org.eclipse.ui.IEditorDescriptor; >+import org.eclipse.ui.IWorkbenchWindow; >+import org.eclipse.ui.PartInitException; >+import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.ide.IDE; >+import org.eclipse.ui.progress.UIJob; >+ >+import com.ibm.icu.text.MessageFormat; >+ >+/** >+ * Job that performs a API migration scan. >+ */ >+public class ApiMigrationScanJob extends Job { >+ >+ /** >+ * Associated launch configuration >+ */ >+ private ILaunchConfiguration configuration = null; >+ >+ /** >+ * List of components that were not searched >+ */ >+ Set notsearched = null; >+ >+ /** >+ * @param name >+ */ >+ public ApiMigrationScanJob(ILaunchConfiguration configuration) { >+ super(MessageFormat.format(Messages.ApiMigrationScanJob_api_migration_report, new String[]{configuration.getName()})); >+ this.configuration = configuration; >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor) >+ */ >+ protected IStatus run(IProgressMonitor monitor) { >+ // Build API baseline >+ SubMonitor localmonitor = SubMonitor.convert(monitor); >+ try { >+ IPath rootpath = null; >+ String xmlPath = this.configuration.getAttribute(ApiMigrationLaunchDelegate.REPORT_PATH, (String)null); >+ if (xmlPath == null) { >+ abort(Messages.ApiMigrationScanJob_missing_xml_loc); >+ } >+ rootpath = new Path(xmlPath); >+ int kind = this.configuration.getAttribute(ApiMigrationLaunchDelegate.TARGET_KIND, 0); >+ if(kind != ApiMigrationLaunchDelegate.KIND_HTML_ONLY) { >+ localmonitor.setTaskName(Messages.ApiMigrationScanJob_preparing_for_scan); >+ localmonitor.setWorkRemaining((isSpecified(ApiMigrationLaunchDelegate.CREATE_HTML) ? 14 : 13)); >+ // create baseline >+ IApiBaseline baseline = createApiBaseline(kind, localmonitor.newChild(1)); >+ Set ids = new HashSet(); >+ TreeSet scope = new TreeSet(Util.componentsorter); >+ getContext(baseline, ids, scope, localmonitor.newChild(2)); >+ >+ try { >+ >+ xmlPath = rootpath.append("xml").toOSString(); //$NON-NLS-1$ >+ >+ ReferenceLookupVisitor lookup = new ReferenceLookupVisitor(baseline, xmlPath); >+ lookup.setAnalysisScope(configuration.getAttribute(ApiMigrationLaunchDelegate.SEARCH_SCOPE, (String)null)); >+ lookup.setTargetScope(configuration.getAttribute(ApiMigrationLaunchDelegate.TARGET_SCOPE, (String)null)); >+ >+ String usageScanPath = configuration.getAttribute(ApiMigrationLaunchDelegate.USAGE_SCAN_PATH, (String)null); >+ Path path = new Path(usageScanPath); >+ File file = new File(path.append("xml").toOSString()); //$NON-NLS-1$ >+ >+ if(isSpecified(ApiMigrationLaunchDelegate.CLEAN_XML)) { >+ localmonitor.setTaskName(Messages.ApiMigrationScanJob_cleaning_xml_loc); >+ scrubReportLocation(file, localmonitor.newChild(1)); >+ } >+ >+ UseScanParser parser = new UseScanParser(); >+ parser.parse(file.getAbsolutePath(), localmonitor.newChild(4), lookup); >+ >+ } catch (Exception e) { >+ e.printStackTrace(); >+ return Status.CANCEL_STATUS; // TODO wrap in a core exception >+ } >+ finally { >+ ApiBaselineManager apiManager = ApiBaselineManager.getManager(); >+ IApiBaseline[] baselines = apiManager.getApiBaselines(); >+ boolean dispose = true; >+ for (int i = 0; i < baselines.length; i++) { >+ if (baseline.equals(baselines[i])) { >+ dispose = false; >+ break; >+ } >+ } >+ if (dispose) { >+ baseline.dispose(); >+ } >+ } >+ } >+ else { >+ localmonitor.setWorkRemaining(10); >+ } >+ if(isSpecified(ApiUseLaunchDelegate.CREATE_HTML)) { >+ localmonitor.setTaskName(Messages.ApiMigrationScanJob_generating_html_reports); >+ String htmlPath = rootpath.append("html").toOSString(); //$NON-NLS-1$ >+ performReportCreation( >+ isSpecified(ApiUseLaunchDelegate.CLEAN_HTML), >+ htmlPath, >+ xmlPath, >+ isSpecified(ApiUseLaunchDelegate.DISPLAY_REPORT), >+ getStrings(this.configuration.getAttribute(ApiMigrationLaunchDelegate.REPORT_TO_PATTERNS_LIST, (List)null)), >+ getStrings(this.configuration.getAttribute(ApiMigrationLaunchDelegate.REPORT_PATTERNS_LIST, (List)null)), >+ localmonitor.newChild(10)); >+ } >+ >+ } catch (CoreException e) { >+ return e.getStatus(); >+ } >+ finally { >+ localmonitor.done(); >+ } >+ return Status.OK_STATUS; >+ } >+ >+ private String[] getStrings(List list) { >+ if (list == null || list.isEmpty()) { >+ return null; >+ } >+ return (String[]) list.toArray(new String[list.size()]); >+ } >+ >+ /** >+ * Throws a new {@link CoreException} with the given message >+ * @param message >+ * @throws CoreException >+ */ >+ void abort(String message) throws CoreException { >+ throw new CoreException(new Status(IStatus.ERROR, ApiUIPlugin.PLUGIN_ID, message)); >+ } >+ >+ /** >+ * Creates a new {@link IApiBaseline} from the location set in the backing launch configuration >+ * @param kind >+ * @param monitor >+ * @return the new {@link IApiBaseline} >+ * @throws CoreException >+ */ >+ private IApiBaseline createApiBaseline(int kind, IProgressMonitor monitor) throws CoreException { >+ ApiBaselineManager bmanager = ApiBaselineManager.getManager(); >+ switch (kind) { >+ case ApiUseLaunchDelegate.KIND_API_BASELINE: >+ String name = this.configuration.getAttribute(ApiUseLaunchDelegate.BASELINE_NAME, (String)null); >+ if (name == null) { >+ abort(Messages.ApiMigrationScanJob_baseline_name_missing); >+ } >+ IApiBaseline baseline = bmanager.getApiBaseline(name); >+ if (baseline == null) { >+ abort(MessageFormat.format(Messages.ApiMigrationScanJob_baseline_does_not_exist, new String[]{name})); >+ } >+ return baseline; >+ case ApiUseLaunchDelegate.KIND_INSTALL_PATH: >+ String path = this.configuration.getAttribute(ApiUseLaunchDelegate.INSTALL_PATH, (String)null); >+ if (path == null) { >+ abort(Messages.ApiMigrationScanJob_unspecified_install_path); >+ } >+ File file = new File(path); >+ if (!file.exists() || !file.isDirectory()) { >+ abort(MessageFormat.format(Messages.ApiMigrationScanJob_intall_dir_does_no_exist, new String[]{path})); >+ } >+ return createBaseline(new Path(file.getAbsolutePath()), monitor); >+ case ApiUseLaunchDelegate.KIND_TARGET_DEFINITION: >+ String memento = this.configuration.getAttribute(ApiUseLaunchDelegate.TARGET_HANDLE, (String)null); >+ if (memento == null) { >+ abort(Messages.ApiMigrationScanJob_target_unspecified); >+ } >+ ITargetPlatformService service = getTargetService(); >+ ITargetHandle handle = service.getTarget(memento); >+ ITargetDefinition definition = handle.getTargetDefinition(); >+ return createBaseline(definition, monitor); >+ default: >+ abort(Messages.ApiMigrationScanJob_target_api_unspecified); >+ } >+ return null; >+ } >+ >+ /** >+ * Returns the target service or <code>null</code> >+ * >+ * @return service or <code>null</code> >+ */ >+ private ITargetPlatformService getTargetService() { >+ return (ITargetPlatformService) ApiUIPlugin.getDefault().acquireService(ITargetPlatformService.class.getName()); >+ } >+ >+ /** >+ * Collects the context of reference ids and scope elements in one pass >+ * @param baseline the baseline to check components from >+ * @param ids the reference ids to consider >+ * @param scope the scope of elements to search >+ * @param monitor >+ * @throws CoreException >+ */ >+ private void getContext(IApiBaseline baseline, Set ids, Set scope, IProgressMonitor monitor) throws CoreException { >+ SubMonitor localmonitor = SubMonitor.convert(monitor, Messages.ApiMigrationScanJob_collecting_target_components, 10); >+ this.notsearched = new TreeSet(Util.componentsorter); >+ String regex = this.configuration.getAttribute(ApiUseLaunchDelegate.TARGET_SCOPE, (String)null); >+ Pattern pattern = getPattern(regex); >+ regex = this.configuration.getAttribute(ApiUseLaunchDelegate.SEARCH_SCOPE, (String)null); >+ Pattern pattern2 = getPattern(regex); >+ IApiComponent[] components = baseline.getApiComponents(); >+ localmonitor.setWorkRemaining(components.length); >+ for (int i = 0; i < components.length; i++) { >+ IApiComponent component = components[i]; >+ localmonitor.subTask(NLS.bind(Messages.ApiMigrationScanJob_checking_component, component.getSymbolicName())); >+ Util.updateMonitor(localmonitor, 1); >+ if (acceptComponent(component, pattern, true)) { >+ ids.add(component.getSymbolicName()); >+ } >+ if (acceptComponent(component, pattern2, false)) { >+ scope.add(component); >+ } >+ else { >+ localmonitor.subTask(NLS.bind(Messages.ApiMigrationScanJob_skipping_component, component.getSymbolicName())); >+ this.notsearched.add(new SkippedComponent(component.getSymbolicName(), component.getVersion(), null)); >+ } >+ } >+ } >+ >+ /** >+ * Returns a pattern for the given regular expression or <code>null</code> if none. >+ * >+ * @param regex expression, <code>null</code> or empty >+ * @return associated pattern or <code>null</code> >+ */ >+ private Pattern getPattern(String regex) { >+ if (regex == null) { >+ return null; >+ } >+ if (regex.trim().length() == 0) { >+ return null; >+ } >+ return Pattern.compile(regex); >+ } >+ >+ /** >+ * Returns if we should add the given component to our search scope >+ * @param component >+ * @param pattern >+ * @param allowresolve >+ * @return >+ * @throws CoreException >+ */ >+ boolean acceptComponent(IApiComponent component, Pattern pattern, boolean allowresolve) throws CoreException { >+ if(!allowresolve) { >+ ResolverError[] errors = component.getErrors(); >+ if(errors != null) { >+ this.notsearched.add(new SkippedComponent(component.getSymbolicName(), component.getVersion(), errors)); >+ return false; >+ } >+ } >+ if(component.isSystemComponent()) { >+ return false; >+ } >+ if(pattern != null) { >+ return pattern.matcher(component.getSymbolicName()).matches(); >+ } >+ return true; >+ } >+ >+ >+ >+ /** >+ * Returns if the given search modifier is set in the backing {@link ILaunchConfiguration} >+ * @param modifier >+ * @return true if the modifier is set, false otherwise >+ * @throws CoreException >+ */ >+ private boolean isSpecified(int modifier) throws CoreException { >+ int modifiers = configuration.getAttribute(ApiUseLaunchDelegate.SEARCH_MODIFIERS, 0); >+ return (modifiers & modifier) > 0; >+ } >+ >+ /** >+ * Performs the report creation >+ * @param cleanh >+ * @param hlocation >+ * @param rlocation >+ * @param openhtml >+ * @param monitor >+ * @throws OperationCanceledException >+ */ >+ void performReportCreation(boolean cleanh, >+ String hlocation, >+ String rlocation, >+ boolean openhtml, >+ String[] topatterns, >+ String[] frompatterns, >+ IProgressMonitor monitor) { >+ SubMonitor localmonitor = SubMonitor.convert(monitor, Messages.ApiMigrationScanJob_creating_html_reports, 10); >+ if(cleanh) { >+ cleanReportLocation(hlocation, localmonitor.newChild(5)); >+ } >+ try { >+ MigrationReportConvertor converter = new MigrationReportConvertor(hlocation, rlocation, topatterns, frompatterns); >+ converter.convert(null, localmonitor.newChild(5)); >+ if(openhtml) { >+ final File index = converter.getReportIndex(); >+ if(index != null) { >+ UIJob ujob = new UIJob(Util.EMPTY_STRING){ >+ public IStatus runInUIThread(IProgressMonitor monitor) { >+ IEditorDescriptor edesc = null; >+ try { >+ edesc = IDE.getEditorDescriptor(index.getName()); >+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); >+ IDE.openEditor(window.getActivePage(), >+ index.toURI(), >+ edesc.getId(), >+ true); >+ } catch (PartInitException e) { >+ e.printStackTrace(); >+ } >+ return Status.OK_STATUS; >+ } >+ }; >+ ujob.setPriority(Job.INTERACTIVE); >+ ujob.setSystem(true); >+ ujob.schedule(); >+ } >+ } >+ } >+ catch (OperationCanceledException oce) { >+ //re-throw >+ throw oce; >+ } >+ catch(Exception e) { >+ ApiPlugin.log(e); >+ } >+ } >+ >+ /** >+ * Cleans the report location specified by the parameter reportLocation >+ * @param monitor >+ */ >+ void cleanReportLocation(String location, IProgressMonitor monitor) { >+ File file = new File(location); >+ SubMonitor localmonitor = SubMonitor.convert(monitor, Messages.ApiMigrationScanJob_deleting_old_reports, IProgressMonitor.UNKNOWN); >+ if(file.exists()) { >+ Util.updateMonitor(localmonitor, 0); >+ scrubReportLocation(file, localmonitor); >+ localmonitor.subTask(NLS.bind(Messages.ApiMigrationScanJob_deleting_root_folder, file.getName())); >+ } >+ } >+ >+ /** >+ * Cleans the location if it exists >+ * @param file >+ * @param monitor >+ */ >+ void scrubReportLocation(File file, IProgressMonitor monitor) { >+ if(file.exists() && file.isDirectory()) { >+ File[] files = file.listFiles(); >+ for (int i = 0; i < files.length; i++) { >+ monitor.subTask(NLS.bind(Messages.ApiMigrationScanJob_deleteing_file, files[i].getPath())); >+ Util.updateMonitor(monitor, 0); >+ if(files[i].isDirectory()) { >+ scrubReportLocation(files[i], monitor); >+ } >+ else { >+ files[i].delete(); >+ } >+ } >+ file.delete(); >+ } >+ } >+ >+ /** >+ * Creates an API baseline from a target definition. >+ * >+ * @param definition >+ * @param monitor progress monitor >+ */ >+ private IApiBaseline createBaseline(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException { >+ SubMonitor localmonitor = SubMonitor.convert(monitor, Messages.ApiMigrationScanJob_reading_target, 10); >+ definition.resolve(localmonitor.newChild(2)); >+ Util.updateMonitor(localmonitor, 1); >+ IResolvedBundle[] bundles = definition.getBundles(); >+ List components = new ArrayList(); >+ IApiBaseline profile = ApiModelFactory.newApiBaseline(definition.getName()); >+ localmonitor.setWorkRemaining(bundles.length); >+ for (int i = 0; i < bundles.length; i++) { >+ Util.updateMonitor(localmonitor, 1); >+ if (bundles[i].getStatus().isOK() && !bundles[i].isSourceBundle()) { >+ IApiComponent component = ApiModelFactory.newApiComponent(profile, URIUtil.toFile(bundles[i].getBundleInfo().getLocation()).getAbsolutePath()); >+ if (component != null) { >+ components.add(component); >+ } >+ } >+ } >+ profile.addApiComponents((IApiComponent[]) components.toArray(new IApiComponent[components.size()])); >+ return profile; >+ } >+ >+ /** >+ * Creates a baseline at an install location, as a plain directory (does not treat as an install). >+ * >+ * @param path >+ * @param monitor >+ */ >+ private IApiBaseline createBaseline(IPath path, IProgressMonitor monitor) throws CoreException { >+ SubMonitor localmonitor = SubMonitor.convert(monitor, Messages.ApiMigrationScanJob_scanning, 10); >+ ITargetPlatformService service = (ITargetPlatformService) ApiUIPlugin.getDefault().acquireService(ITargetPlatformService.class.getName()); >+ IBundleContainer container = service.newDirectoryContainer(path.toOSString()); >+ // treat as an installation, if that fails, try plug-ins directory >+ ITargetDefinition definition = service.newTarget(); >+ container.resolve(definition, localmonitor.newChild(1)); >+ Util.updateMonitor(localmonitor, 1); >+ IResolvedBundle[] bundles = container.getBundles(); >+ List components = new ArrayList(); >+ IApiBaseline profile = ApiModelFactory.newApiBaseline(this.configuration.getName()); >+ Util.updateMonitor(localmonitor, 1); >+ if (bundles.length > 0) { >+ localmonitor.setWorkRemaining(bundles.length); >+ for (int i = 0; i < bundles.length; i++) { >+ Util.updateMonitor(localmonitor, 1); >+ if (bundles[i].getStatus().isOK() && !bundles[i].isSourceBundle()) { >+ IApiComponent component = ApiModelFactory.newApiComponent(profile, URIUtil.toFile(bundles[i].getBundleInfo().getLocation()).getAbsolutePath()); >+ if (component != null) { >+ components.add(component); >+ } >+ } >+ } >+ } else { >+ abort(MessageFormat.format(Messages.ApiMigrationScanJob_no_bundles, new String[]{path.toOSString()})); >+ } >+ profile.addApiComponents((IApiComponent[]) components.toArray(new IApiComponent[components.size()])); >+ return profile; >+ } >+ >+} >Index: src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationScanTab.java >=================================================================== >RCS file: src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationScanTab.java >diff -N src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationScanTab.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationScanTab.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,706 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 Red Hat and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Chris Aniszczyk <caniszczyk@gmail.com> - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.pde.api.tools.ui.internal.migration; >+ >+import java.util.ArrayList; >+import java.util.Collections; >+import java.util.Comparator; >+import java.util.HashSet; >+import java.util.List; >+import java.util.regex.Pattern; >+import java.util.regex.PatternSyntaxException; >+ >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.Path; >+import org.eclipse.debug.core.ILaunchConfiguration; >+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; >+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab; >+import org.eclipse.osgi.util.NLS; >+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin; >+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline; >+import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin; >+import org.eclipse.pde.api.tools.ui.internal.IApiToolsConstants; >+import org.eclipse.pde.api.tools.ui.internal.IApiToolsHelpContextIds; >+import org.eclipse.pde.api.tools.ui.internal.SWTFactory; >+import org.eclipse.pde.api.tools.ui.internal.use.ApiUseLaunchDelegate; >+import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition; >+import org.eclipse.pde.internal.core.target.provisional.ITargetHandle; >+import org.eclipse.pde.internal.core.target.provisional.ITargetPlatformService; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.events.ModifyEvent; >+import org.eclipse.swt.events.ModifyListener; >+import org.eclipse.swt.events.SelectionAdapter; >+import org.eclipse.swt.events.SelectionEvent; >+import org.eclipse.swt.graphics.Image; >+import org.eclipse.swt.layout.GridData; >+import org.eclipse.swt.layout.GridLayout; >+import org.eclipse.swt.widgets.Button; >+import org.eclipse.swt.widgets.Combo; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Control; >+import org.eclipse.swt.widgets.DirectoryDialog; >+import org.eclipse.swt.widgets.FileDialog; >+import org.eclipse.swt.widgets.Group; >+import org.eclipse.swt.widgets.Label; >+import org.eclipse.swt.widgets.Text; >+import org.eclipse.ui.PlatformUI; >+ >+/** >+ * Tab for an API migration scan >+ * @since 1.1 >+ */ >+public class ApiMigrationScanTab extends AbstractLaunchConfigurationTab { >+ >+ static final String[] EXTENSIONS = new String[] {"*.txt"}; //$NON-NLS-1$ >+ >+ /** >+ * Default selection adapter for updating the launch dialog >+ */ >+ SelectionAdapter selectionadapter = new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ updateLaunchConfigurationDialog(); >+ }; >+ }; >+ >+ /** >+ * Default modify adapter for updating the launch dialog >+ */ >+ ModifyListener modifyadapter = new ModifyListener() { >+ public void modifyText(ModifyEvent e) { >+ updateLaunchConfigurationDialog(); >+ } >+ }; >+ >+ boolean initializing = false; >+ Combo baseline, targetCombo; >+ Button radioBaseline = null, >+ radioTarget = null, >+ radioInstall = null, >+ baselinesButton = null, >+ targetsButton = null, >+ installButton = null, >+ usageButton = null, >+ createhtml = null, >+ openreport = null, >+ cleanreportlocation = null, >+ cleanhtmllocation = null; >+ ITargetHandle[] targetHandles = new ITargetHandle[0]; >+ Text installLocation = null, >+ usageLocation = null, >+ searchScope = null, >+ targetScope = null, >+ reportlocation = null, >+ description = null; >+ Label usageLabel; >+ Group searchForGroup = null, >+ searchInGroup = null; >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite) >+ */ >+ public void createControl(Composite parent) { >+ Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_HORIZONTAL); >+ GridLayout layout = (GridLayout) comp.getLayout(); >+ layout.makeColumnsEqualWidth = true; >+ >+ Group group = SWTFactory.createGroup(comp, Messages.ApiMigrationScanTab_analyze, 3, 3, GridData.FILL_HORIZONTAL); >+ >+ SWTFactory.createLabel(group, Messages.ApiMigrationScanTab_candidate, 3); >+ this.radioBaseline = SWTFactory.createRadioButton(group, Messages.ApiMigrationScanTab_api_baseline); >+ GridData gd = (GridData) radioBaseline.getLayoutData(); >+ gd.horizontalIndent = 10; >+ this.radioBaseline.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ updateTarget(); >+ } >+ }); >+ this.baseline = SWTFactory.createCombo(group, >+ SWT.BORDER | SWT.FLAT | SWT.READ_ONLY, >+ 1, >+ GridData.BEGINNING | GridData.FILL_HORIZONTAL, >+ null); >+ gd = (GridData) this.baseline.getLayoutData(); >+ gd.grabExcessHorizontalSpace = true; >+ this.baseline.addSelectionListener(selectionadapter); >+ this.baselinesButton = SWTFactory.createPushButton(group, Messages.ApiMigrationScanTab_baselines, null); >+ this.baselinesButton.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ int bef = baseline.getSelectionIndex(); >+ String name = null; >+ if (bef >= 0) { >+ name = baseline.getItem(bef); >+ } >+ SWTFactory.showPreferencePage(getShell(), "org.eclipse.pde.api.tools.ui.apiprofiles.prefpage", null); //$NON-NLS-1$ >+ updateAvailableBaselines(); >+ if (name != null) { >+ String[] items = baseline.getItems(); >+ for (int i = 0; i < items.length; i++) { >+ if (name.equals(items[i])) { >+ baseline.select(i); >+ break; >+ } >+ } >+ } >+ updateLaunchConfigurationDialog(); >+ } >+ }); >+ >+ this.radioTarget = SWTFactory.createRadioButton(group, Messages.ApiMigrationScanTab_target_definitions); >+ gd = (GridData) radioTarget.getLayoutData(); >+ gd.horizontalIndent = 10; >+ this.radioTarget.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ updateTarget(); >+ } >+ }); >+ this.targetCombo = SWTFactory.createCombo(group, >+ SWT.BORDER | SWT.FLAT | SWT.READ_ONLY, >+ 1, >+ GridData.BEGINNING | GridData.FILL_HORIZONTAL, >+ null); >+ gd = (GridData) this.targetCombo.getLayoutData(); >+ gd.grabExcessHorizontalSpace = true; >+ this.targetCombo.addSelectionListener(selectionadapter); >+ this.targetsButton = SWTFactory.createPushButton(group, Messages.ApiMigrationScanTab_targets, null); >+ this.targetsButton.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ int index = targetCombo.getSelectionIndex(); >+ ITargetHandle handle = null; >+ if (index >= 0) { >+ handle = targetHandles[index]; >+ } >+ SWTFactory.showPreferencePage(getShell(), "org.eclipse.pde.ui.TargetPlatformPreferencePage", null); //$NON-NLS-1$ >+ updateAvailableTargets(); >+ if (handle != null) { >+ for (int i = 0; i < targetHandles.length; i++) { >+ if (handle.equals(targetHandles[i])) { >+ targetCombo.select(i); >+ break; >+ } >+ } >+ } >+ updateLaunchConfigurationDialog(); >+ } >+ }); >+ >+ this.radioInstall = SWTFactory.createRadioButton(group, Messages.ApiMigrationScanTab_install_location); >+ gd = (GridData) radioInstall.getLayoutData(); >+ gd.horizontalIndent = 10; >+ this.radioInstall.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ updateTarget(); >+ } >+ }); >+ this.installLocation = SWTFactory.createText(group, SWT.SINGLE | SWT.FLAT | SWT.BORDER, 1, GridData.FILL_HORIZONTAL); >+ gd = (GridData) this.installLocation.getLayoutData(); >+ gd.grabExcessHorizontalSpace = true; >+ this.installButton = SWTFactory.createPushButton(group, Messages.ApiMigrationScanTab_browse, null); >+ this.installButton.addSelectionListener(new SelectionAdapter(){ >+ public void widgetSelected(SelectionEvent e) { >+ handleFolderBrowse(installLocation, Messages.ApiMigrationScanTab_select_install_location); >+ updateLaunchConfigurationDialog(); >+ } >+ }); >+ >+ >+ >+ SWTFactory.createLabel(group, Messages.ApiMigrationScanTab_usage_scan, 3); >+ Label label = SWTFactory.createLabel(group, Messages.ApiMigrationScanTab_install_location, 1); >+ gd = (GridData) label.getLayoutData(); >+ gd.horizontalIndent = 10; >+ this.usageLocation = SWTFactory.createText(group, SWT.SINGLE | SWT.FLAT | SWT.BORDER, 1, GridData.FILL_HORIZONTAL); >+ gd = (GridData) this.usageLocation.getLayoutData(); >+ gd.grabExcessHorizontalSpace = true; >+ this.usageButton = SWTFactory.createPushButton(group, Messages.ApiMigrationScanTab_browse, null); >+ this.usageButton.addSelectionListener(new SelectionAdapter(){ >+ public void widgetSelected(SelectionEvent e) { >+ handleFolderBrowse(usageLocation, Messages.ApiMigrationScanTab_select_install_location); >+ updateLaunchConfigurationDialog(); >+ } >+ }); >+ >+ >+ searchForGroup = SWTFactory.createGroup(comp, Messages.ApiMigrationScanTab_search_for, 2, 1, GridData.FILL_HORIZONTAL); >+ SWTFactory.createLabel(searchForGroup, Messages.ApiMigrationScanTab_references_to, 1); >+ this.targetScope = SWTFactory.createText(searchForGroup, SWT.SINGLE | SWT.FLAT | SWT.BORDER, 1, GridData.FILL_HORIZONTAL); >+ this.targetScope.addModifyListener(modifyadapter); >+ >+ searchInGroup = SWTFactory.createGroup(comp, Messages.ApiMigrationScanTab_search_in, 2, 1, GridData.FILL_HORIZONTAL); >+ gd = (GridData)searchInGroup.getLayoutData(); >+ gd.verticalAlignment = SWT.FILL; >+ SWTFactory.createLabel(searchInGroup, Messages.ApiMigrationScanTab_bundles_matching, 1); >+ this.searchScope = SWTFactory.createText(searchInGroup, SWT.SINGLE | SWT.FLAT | SWT.BORDER, 1, GridData.FILL_HORIZONTAL); >+ this.searchScope.addModifyListener(modifyadapter); >+ >+ group = SWTFactory.createGroup(comp, Messages.ApiMigrationScanTab_reporting, 2, 2, GridData.FILL_HORIZONTAL); >+ SWTFactory.createLabel(group, Messages.ApiMigrationScanTab_report_location, 2); >+ this.reportlocation = SWTFactory.createText(group, SWT.SINGLE | SWT.FLAT | SWT.BORDER, 1, GridData.FILL_HORIZONTAL); >+ this.reportlocation.addModifyListener(modifyadapter); >+ gd = (GridData) this.reportlocation.getLayoutData(); >+ gd.grabExcessHorizontalSpace = true; >+ Button browse = SWTFactory.createPushButton(group, Messages.ApiMigrationScanTab_brows_e_, null); >+ browse.addSelectionListener(new SelectionAdapter(){ >+ public void widgetSelected(SelectionEvent e) { >+ handleFolderBrowse(reportlocation, "Select the location to write the report to"); //$NON-NLS-1$ >+ } >+ }); >+ this.cleanreportlocation = SWTFactory.createCheckButton(group, Messages.ApiMigrationScanTab_clean_report_dir, null, false, 2); >+ gd = (GridData) this.cleanreportlocation.getLayoutData(); >+ this.cleanreportlocation.addSelectionListener(selectionadapter); >+ gd.horizontalIndent = 10; >+ >+ this.createhtml = SWTFactory.createCheckButton(group, Messages.ApiMigrationScanTab_create_html_report, null, false, 2); >+ this.createhtml.addSelectionListener(new SelectionAdapter(){ >+ public void widgetSelected(SelectionEvent e) { >+ boolean enabled = ((Button)e.widget).getSelection(); >+ cleanhtmllocation.setEnabled(enabled); >+ openreport.setEnabled(enabled); >+ updateLaunchConfigurationDialog(); >+ } >+ }); >+ this.cleanhtmllocation = SWTFactory.createCheckButton(group, Messages.ApiMigrationScanTab_clean_html_report_dir, null, false, 2); >+ gd = (GridData) this.cleanhtmllocation.getLayoutData(); >+ gd.horizontalIndent = 10; >+ this.cleanhtmllocation.addSelectionListener(selectionadapter); >+ this.openreport = SWTFactory.createCheckButton(group, Messages.ApiMigrationScanTab_open_report, null, false, 2); >+ gd = (GridData) this.openreport.getLayoutData(); >+ gd.horizontalIndent = 10; >+ this.openreport.setEnabled(false); >+ this.openreport.addSelectionListener(selectionadapter); >+ SWTFactory.createLabel(group, Messages.ApiMigrationScanTab_description, 1); >+ this.description = SWTFactory.createText(group, SWT.BORDER | SWT.V_SCROLL | SWT.WRAP, 2, GridData.FILL_HORIZONTAL); >+ gd = (GridData) this.description.getLayoutData(); >+ gd.heightHint = 40; >+ this.description.addModifyListener(modifyadapter); >+ // FIXME >+ PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IApiToolsHelpContextIds.API_USE_SCAN_TAB); >+ setControl(comp); >+ } >+ >+ /** >+ * The selected target has changed (radio selection). Update control enabled state and dialog. >+ */ >+ void updateTarget() { >+ switch (getTargetKind()) { >+ case ApiMigrationLaunchDelegate.KIND_API_BASELINE: { >+ baseline.setEnabled(true); >+ baselinesButton.setEnabled(true); >+ targetCombo.setEnabled(false); >+ targetsButton.setEnabled(false); >+ installLocation.setEnabled(false); >+ installButton.setEnabled(false); >+ this.createhtml.setEnabled(true); >+ setGroupEnablement(this.searchForGroup, true); >+ setGroupEnablement(this.searchInGroup, true); >+ break; >+ } >+ case ApiMigrationLaunchDelegate.KIND_TARGET_DEFINITION: { >+ baseline.setEnabled(false); >+ baselinesButton.setEnabled(false); >+ targetCombo.setEnabled(true); >+ targetsButton.setEnabled(true); >+ installLocation.setEnabled(false); >+ installButton.setEnabled(false); >+ this.createhtml.setEnabled(true); >+ setGroupEnablement(this.searchForGroup, true); >+ setGroupEnablement(this.searchInGroup, true); >+ break; >+ } >+ case ApiMigrationLaunchDelegate.KIND_INSTALL_PATH: { >+ baseline.setEnabled(false); >+ baselinesButton.setEnabled(false); >+ targetCombo.setEnabled(false); >+ targetsButton.setEnabled(false); >+ installLocation.setEnabled(true); >+ installButton.setEnabled(true); >+ this.createhtml.setEnabled(true); >+ setGroupEnablement(this.searchForGroup, true); >+ setGroupEnablement(this.searchInGroup, true); >+ break; >+ } >+ case ApiMigrationLaunchDelegate.KIND_HTML_ONLY: { >+ baseline.setEnabled(false); >+ baselinesButton.setEnabled(false); >+ targetCombo.setEnabled(false); >+ targetsButton.setEnabled(false); >+ installLocation.setEnabled(false); >+ installButton.setEnabled(false); >+ this.createhtml.setSelection(true); >+ this.createhtml.setEnabled(false); >+ setGroupEnablement(this.searchForGroup, false); >+ setGroupEnablement(this.searchInGroup, false); >+ break; >+ } >+ } >+ updateLaunchConfigurationDialog(); >+ } >+ >+ /** >+ * Sets the enabled state of all of the child of the given group >+ * @param group >+ * @param enabled >+ */ >+ void setGroupEnablement(Group group, boolean enabled) { >+ Control[] children = group.getChildren(); >+ for (int i = 0; i < children.length; i++) { >+ children[i].setEnabled(enabled); >+ } >+ } >+ >+ /** >+ * @return the kind of target selected for the scan >+ */ >+ private int getTargetKind() { >+ if (this.radioBaseline.getSelection()) { >+ return ApiMigrationLaunchDelegate.KIND_API_BASELINE; >+ } else if (this.radioTarget.getSelection()) { >+ return ApiMigrationLaunchDelegate.KIND_TARGET_DEFINITION; >+ } else if (this.radioInstall.getSelection()) { >+ return ApiMigrationLaunchDelegate.KIND_INSTALL_PATH; >+ } else { >+ return -1; >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() >+ */ >+ public String getName() { >+ return Messages.ApiMigrationScanTab_api_use_report; >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getImage() >+ */ >+ public Image getImage() { >+ return ApiUIPlugin.getSharedImage(IApiToolsConstants.IMG_ELCL_SETUP_APITOOLS); >+ } >+ >+ /** >+ * Updates available target definitions. >+ */ >+ void updateAvailableTargets() { >+ List names = new ArrayList(); >+ ITargetPlatformService service = getTargetService(); >+ if (service != null) { >+ ITargetHandle[] handles = service.getTargets(null); >+ List defs = new ArrayList(); >+ for (int i = 0; i < handles.length; i++) { >+ try { >+ defs.add(handles[i].getTargetDefinition()); >+ } catch (CoreException e) { >+ // Suppress >+ } >+ } >+ Collections.sort(defs, new Comparator() { >+ public int compare(Object o1, Object o2) { >+ ITargetDefinition d1 = (ITargetDefinition) o1; >+ ITargetDefinition d2 = (ITargetDefinition) o2; >+ return d1.getName().compareTo(d2.getName()); >+ } >+ }); >+ targetHandles = new ITargetHandle[defs.size()]; >+ for (int i = 0; i < defs.size(); i++) { >+ ITargetDefinition def = (ITargetDefinition) defs.get(i); >+ targetHandles[i] = def.getHandle(); >+ names.add(def.getName()); >+ } >+ } >+ this.targetCombo.setItems((String[]) names.toArray(new String[names.size()])); >+ } >+ >+ /** >+ * Returns the target service or <code>null</code> >+ * >+ * @return service or <code>null</code> >+ */ >+ private ITargetPlatformService getTargetService() { >+ return (ITargetPlatformService) ApiUIPlugin.getDefault().acquireService(ITargetPlatformService.class.getName()); >+ } >+ >+ /** >+ * Updates available baselines. >+ */ >+ void updateAvailableBaselines() { >+ HashSet ids = new HashSet(); >+ IApiBaseline[] baselines = ApiPlugin.getDefault().getApiBaselineManager().getApiBaselines(); >+ for (int i = 0; i < baselines.length; i++) { >+ ids.add(baselines[i].getName()); >+ } >+ this.baseline.setItems((String[]) ids.toArray(new String[ids.size()])); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration) >+ */ >+ public void initializeFrom(ILaunchConfiguration configuration) { >+ this.initializing = true; >+ try { >+ updateAvailableBaselines(); >+ updateAvailableTargets(); >+ updateRadioButtons(configuration); >+ restoreComboSelection(this.baseline, configuration.getAttribute(ApiMigrationLaunchDelegate.BASELINE_NAME, (String)null)); >+ String memento = configuration.getAttribute(ApiMigrationLaunchDelegate.TARGET_HANDLE, (String)null); >+ if (memento != null) { >+ ITargetPlatformService service = getTargetService(); >+ if (service != null) { >+ ITargetHandle handle = service.getTarget(memento); >+ for (int i = 0; i < this.targetHandles.length; i++) { >+ if (handle.equals(this.targetHandles[i])) { >+ this.targetCombo.select(i); >+ break; >+ } >+ } >+ } >+ } >+ if(this.targetCombo.getSelectionIndex() < 0) { >+ this.targetCombo.select(0); >+ } >+ this.installLocation.setText(configuration.getAttribute(ApiMigrationLaunchDelegate.INSTALL_PATH, IApiToolsConstants.EMPTY_STRING)); >+ this.reportlocation.setText(configuration.getAttribute(ApiMigrationLaunchDelegate.REPORT_PATH, IApiToolsConstants.EMPTY_STRING)); >+ this.cleanreportlocation.setSelection(isSpecified(ApiMigrationLaunchDelegate.CLEAN_XML, configuration)); >+ boolean enabled = isSpecified(ApiMigrationLaunchDelegate.CREATE_HTML, configuration); >+ this.createhtml.setSelection(enabled); >+ this.openreport.setEnabled(enabled); >+ this.cleanhtmllocation.setEnabled(enabled); >+ this.openreport.setSelection(isSpecified(ApiMigrationLaunchDelegate.DISPLAY_REPORT, configuration)); >+ this.cleanhtmllocation.setSelection(isSpecified(ApiMigrationLaunchDelegate.CLEAN_HTML, configuration)); >+ this.searchScope.setText(configuration.getAttribute(ApiMigrationLaunchDelegate.SEARCH_SCOPE, IApiToolsConstants.EMPTY_STRING)); >+ this.targetScope.setText(configuration.getAttribute(ApiMigrationLaunchDelegate.TARGET_SCOPE, IApiToolsConstants.EMPTY_STRING)); >+ this.description.setText(configuration.getAttribute(ApiMigrationLaunchDelegate.DESCRIPTION, IApiToolsConstants.EMPTY_STRING)); >+ this.usageLocation.setText(configuration.getAttribute(ApiMigrationLaunchDelegate.USAGE_SCAN_PATH, IApiToolsConstants.EMPTY_STRING)); >+ updateTarget(); >+ } catch (CoreException e) { >+ setErrorMessage(e.getStatus().getMessage()); >+ } >+ finally { >+ this.initializing = false; >+ } >+ } >+ >+ /** >+ * Updates the radio button group in {@link #initializeFrom(ILaunchConfiguration)} to ensure >+ * the radio group stays up-to-date when a revert is performed >+ * >+ * @param configuration >+ */ >+ void updateRadioButtons(ILaunchConfiguration configuration) throws CoreException { >+ int kind = configuration.getAttribute(ApiUseLaunchDelegate.TARGET_KIND, 0); >+ switch (kind) { >+ case ApiUseLaunchDelegate.KIND_API_BASELINE: { >+ radioBaseline.setSelection(true); >+ radioTarget.setSelection(false); >+ radioInstall.setSelection(false); >+ break; >+ } >+ case ApiUseLaunchDelegate.KIND_TARGET_DEFINITION: { >+ radioBaseline.setSelection(false); >+ radioTarget.setSelection(true); >+ radioInstall.setSelection(false); >+ break; >+ } >+ case ApiUseLaunchDelegate.KIND_INSTALL_PATH: { >+ radioBaseline.setSelection(false); >+ radioTarget.setSelection(false); >+ radioInstall.setSelection(true); >+ break; >+ } >+ case ApiUseLaunchDelegate.KIND_HTML_ONLY: { >+ radioBaseline.setSelection(false); >+ radioTarget.setSelection(false); >+ radioInstall.setSelection(false); >+ break; >+ } >+ default: { >+ radioBaseline.setSelection(true); >+ radioTarget.setSelection(false); >+ radioInstall.setSelection(false); >+ } >+ } >+ } >+ >+ /** >+ * Returns <code>true</code> if the given modifier is set in the configuration >+ * @param modifier >+ * @param configuration >+ * @return >+ * @throws CoreException >+ */ >+ private boolean isSpecified(int modifier, ILaunchConfiguration configuration) throws CoreException { >+ int modifiers = configuration.getAttribute(ApiMigrationLaunchDelegate.SEARCH_MODIFIERS, 0); >+ return (modifiers & modifier) > 0; >+ } >+ >+ /** >+ * Restores the selected item for the given combo based on the stored value from the >+ * configuration >+ * >+ * @param combo >+ * @param value >+ * @param settings >+ */ >+ private void restoreComboSelection(Combo combo, String value) { >+ int idx = -1; >+ if(value != null) { >+ idx = combo.indexOf(value); >+ if(idx > -1) { >+ combo.select(idx); >+ } >+ else { >+ combo.select(0); >+ } >+ } >+ else { >+ combo.select(0); >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) >+ */ >+ public void performApply(ILaunchConfigurationWorkingCopy configuration) { >+ configuration.setAttribute(ApiMigrationLaunchDelegate.TARGET_KIND, getTargetKind()); >+ configuration.setAttribute(ApiMigrationLaunchDelegate.BASELINE_NAME, this.baseline.getText().trim()); >+ configuration.setAttribute(ApiMigrationLaunchDelegate.INSTALL_PATH, this.installLocation.getText().trim()); >+ configuration.setAttribute(ApiMigrationLaunchDelegate.TARGET_HANDLE, getTargetMemento()); >+ int modifiers = 0; >+ modifiers = consider(this.openreport, ApiMigrationLaunchDelegate.DISPLAY_REPORT, modifiers); >+ modifiers = consider(this.cleanhtmllocation, ApiMigrationLaunchDelegate.CLEAN_HTML, modifiers); >+ modifiers = consider(this.cleanreportlocation, ApiMigrationLaunchDelegate.CLEAN_XML, modifiers); >+ modifiers = consider(this.createhtml, ApiMigrationLaunchDelegate.CREATE_HTML, modifiers); >+ configuration.setAttribute(ApiMigrationLaunchDelegate.SEARCH_MODIFIERS, modifiers); >+ IPath path = new Path(this.reportlocation.getText().trim()); >+ configuration.setAttribute(ApiMigrationLaunchDelegate.REPORT_PATH, path.toPortableString()); >+ configuration.setAttribute(ApiMigrationLaunchDelegate.SEARCH_SCOPE, this.searchScope.getText().trim()); >+ configuration.setAttribute(ApiMigrationLaunchDelegate.TARGET_SCOPE, this.targetScope.getText().trim()); >+ configuration.setAttribute(ApiMigrationLaunchDelegate.DESCRIPTION, this.description.getText().trim()); >+ configuration.setAttribute(ApiMigrationLaunchDelegate.USAGE_SCAN_PATH, this.usageLocation.getText().trim()); >+ } >+ >+ /** >+ * Returns the memento for the selected target definition or <code>null</code> if none. >+ * >+ * @return memento or <code>null</code> >+ */ >+ private String getTargetMemento() { >+ ITargetHandle handle = getTargetHandle(); >+ if (handle == null) { >+ return null; >+ } >+ try { >+ return handle.getMemento(); >+ } catch (CoreException e) { >+ setErrorMessage(e.getMessage()); >+ return null; >+ } >+ } >+ >+ /** >+ * Returns the handle of the selected target or <code>null</code> if none. >+ * >+ * @return target handle or <code>null</code> >+ */ >+ private ITargetHandle getTargetHandle() { >+ int index = this.targetCombo.getSelectionIndex(); >+ if (index >= 0) { >+ return this.targetHandles[index]; >+ } >+ return null; >+ } >+ >+ private int consider(Button button, int mask, int modifiers) { >+ if (button.getSelection()) { >+ return modifiers | mask; >+ } >+ return modifiers; >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) >+ */ >+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { >+ // TODO >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration) >+ */ >+ public boolean isValid(ILaunchConfiguration launchConfig) { >+ if(this.initializing) { >+ return true; >+ } >+ setErrorMessage(null); >+ >+ String text = this.reportlocation.getText().trim(); >+ if(IApiToolsConstants.EMPTY_STRING.equals(text)) { >+ setErrorMessage(Messages.ApiMigrationScanTab_enter_report_location); >+ return false; >+ } >+ text = this.usageLocation.getText().trim(); >+ if(IApiToolsConstants.EMPTY_STRING.equals(text)) { >+ setErrorMessage(Messages.ApiMigrationScanTab_enter_usagescan_location); >+ return false; >+ } >+ text = this.searchScope.getText().trim(); >+ try { >+ Pattern.compile(text); >+ } >+ catch(PatternSyntaxException pse) { >+ setErrorMessage(NLS.bind(Messages.ApiMigrationScanTab_regex_problem_search_in, pse.getDescription())); >+ return false; >+ } >+ text = this.targetScope.getText().trim(); >+ try { >+ Pattern.compile(text); >+ } >+ catch(PatternSyntaxException pse) { >+ setErrorMessage(NLS.bind(Messages.ApiMigrationScanTab_regex_problem_search_for, pse.getDescription())); >+ return false; >+ } >+ return true; >+ } >+ >+ /** >+ * Handles browsing for a file with a given set of valid extensions >+ * @param text >+ * @param message >+ */ >+ void handleFileBrowse(Text text, String message, String[] extensions) { >+ FileDialog dialog = new FileDialog(getShell()); >+ dialog.setFilterExtensions(extensions); >+ String loctext = text.getText().trim(); >+ if (loctext.length() > 0) { >+ dialog.setFilterPath(loctext); >+ } >+ String newpath = dialog.open(); >+ if(newpath != null) { >+ text.setText(newpath); >+ } >+ } >+ >+ /** >+ * Handles the Browse... button being selected >+ * @param text >+ */ >+ void handleFolderBrowse(Text text, String message) { >+ DirectoryDialog dialog = new DirectoryDialog(getShell()); >+ dialog.setMessage(message); >+ String loctext = text.getText().trim(); >+ if (loctext.length() > 0) { >+ dialog.setFilterPath(loctext); >+ } >+ String newpath = dialog.open(); >+ if(newpath != null) { >+ text.setText(newpath); >+ } >+ } >+} >Index: src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationTabGroup.java >=================================================================== >RCS file: src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationTabGroup.java >diff -N src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationTabGroup.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/api/tools/ui/internal/migration/ApiMigrationTabGroup.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,27 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 Red Hat and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Chris Aniszczyk <caniszczyk@gmail.com> - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.pde.api.tools.ui.internal.migration; >+ >+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; >+import org.eclipse.debug.ui.ILaunchConfigurationDialog; >+import org.eclipse.debug.ui.ILaunchConfigurationTab; >+ >+public class ApiMigrationTabGroup extends AbstractLaunchConfigurationTabGroup { >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String) >+ */ >+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) { >+ setTabs(new ILaunchConfigurationTab[]{ >+ new ApiMigrationScanTab()}); >+ } >+ >+} >Index: src/org/eclipse/pde/api/tools/ui/internal/migration/Messages.java >=================================================================== >RCS file: src/org/eclipse/pde/api/tools/ui/internal/migration/Messages.java >diff -N src/org/eclipse/pde/api/tools/ui/internal/migration/Messages.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/api/tools/ui/internal/migration/Messages.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 Red Hat and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Chris Aniszczyk <caniszczyk@gmail.com> - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.pde.api.tools.ui.internal.migration; >+ >+import org.eclipse.osgi.util.NLS; >+ >+public class Messages extends NLS { >+ private static final String BUNDLE_NAME = "org.eclipse.pde.api.tools.ui.internal.migration.messages"; //$NON-NLS-1$ >+ >+ public static String ApiMigrationScanJob_api_migration_report; >+ public static String ApiMigrationScanJob_baseline_does_not_exist; >+ public static String ApiMigrationScanJob_baseline_name_missing; >+ public static String ApiMigrationScanJob_checking_component; >+ public static String ApiMigrationScanJob_cleaning_xml_loc; >+ public static String ApiMigrationScanJob_collecting_target_components; >+ public static String ApiMigrationScanJob_creating_html_reports; >+ public static String ApiMigrationScanJob_deleteing_file; >+ public static String ApiMigrationScanJob_deleting_old_reports; >+ public static String ApiMigrationScanJob_deleting_root_folder; >+ public static String ApiMigrationScanJob_generating_html_reports; >+ public static String ApiMigrationScanJob_intall_dir_does_no_exist; >+ public static String ApiMigrationScanJob_missing_xml_loc; >+ public static String ApiMigrationScanJob_no_bundles; >+ public static String ApiMigrationScanJob_preparing_for_scan; >+ public static String ApiMigrationScanJob_reading_target; >+ public static String ApiMigrationScanJob_scanning; >+ public static String ApiMigrationScanJob_skipping_component; >+ public static String ApiMigrationScanJob_target_api_unspecified; >+ public static String ApiMigrationScanJob_target_unspecified; >+ public static String ApiMigrationScanJob_unspecified_install_path; >+ public static String ApiMigrationScanTab_analyze; >+ public static String ApiMigrationScanTab_api_baseline; >+ public static String ApiMigrationScanTab_candidate; >+ public static String ApiMigrationScanTab_usage_scan; >+ public static String ApiMigrationScanTab_api_use_report; >+ public static String ApiMigrationScanTab_baselines; >+ public static String ApiMigrationScanTab_brows_e_; >+ public static String ApiMigrationScanTab_browse; >+ public static String ApiMigrationScanTab_bundles_matching; >+ public static String ApiMigrationScanTab_clean_html_report_dir; >+ public static String ApiMigrationScanTab_clean_report_dir; >+ public static String ApiMigrationScanTab_create_html_report; >+ public static String ApiMigrationScanTab_description; >+ public static String ApiMigrationScanTab_enter_report_location; >+ public static String ApiMigrationScanTab_enter_usagescan_location; >+ public static String ApiMigrationScanTab_install_location; >+ public static String ApiMigrationScanTab_open_report; >+ public static String ApiMigrationScanTab_references_to; >+ public static String ApiMigrationScanTab_regex_problem_search_for; >+ public static String ApiMigrationScanTab_regex_problem_search_in; >+ public static String ApiMigrationScanTab_report_location; >+ public static String ApiMigrationScanTab_reporting; >+ public static String ApiMigrationScanTab_search_for; >+ public static String ApiMigrationScanTab_search_in; >+ public static String ApiMigrationScanTab_select_install_location; >+ public static String ApiMigrationScanTab_target_definitions; >+ public static String ApiMigrationScanTab_targets; >+ >+ static { >+ // initialize resource bundle >+ NLS.initializeMessages(BUNDLE_NAME, Messages.class); >+ } >+ >+ private Messages() { >+ } >+} >Index: src/org/eclipse/pde/api/tools/ui/internal/migration/messages.properties >=================================================================== >RCS file: src/org/eclipse/pde/api/tools/ui/internal/migration/messages.properties >diff -N src/org/eclipse/pde/api/tools/ui/internal/migration/messages.properties >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/api/tools/ui/internal/migration/messages.properties 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,58 @@ >+############################################################################### >+# Copyright (c) 2010 Red Hat and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# Chris Aniszczyk <caniszczyk@gmail.com> - initial API and implementation >+############################################################################### >+ApiMigrationScanJob_api_migration_report=API Migration Report: {0} >+ApiMigrationScanJob_baseline_does_not_exist=API baseline {0} does not exist >+ApiMigrationScanJob_baseline_name_missing=API baseline name unspecified >+ApiMigrationScanJob_checking_component=checking component: {0} >+ApiMigrationScanJob_cleaning_xml_loc=Cleaning existing XML location >+ApiMigrationScanJob_collecting_target_components=Collecting components for scan >+ApiMigrationScanJob_creating_html_reports=Creating HTML reports... >+ApiMigrationScanJob_deleteing_file=deleting file: {0} >+ApiMigrationScanJob_deleting_old_reports=Deleting old reports: >+ApiMigrationScanJob_deleting_root_folder=deleting root folder: {0} >+ApiMigrationScanJob_generating_html_reports=Generating HTML reports >+ApiMigrationScanJob_intall_dir_does_no_exist=Install location is does not exist or is not a directory: {0} >+ApiMigrationScanJob_missing_xml_loc=Missing XML report location >+ApiMigrationScanJob_no_bundles=No bundles found in directory: {0} >+ApiMigrationScanJob_preparing_for_scan=Preparing for migration scan >+ApiMigrationScanJob_reading_target=Reading target definition... >+ApiMigrationScanJob_scanning=Scanning directoy for bundles... >+ApiMigrationScanJob_skipping_component=skipping component: {0} >+ApiMigrationScanJob_target_api_unspecified=Target for API search unspecified >+ApiMigrationScanJob_target_unspecified=Target definition unspecified >+ApiMigrationScanJob_unspecified_install_path=Install path unspecified >+ApiMigrationScanTab_analyze=Analyze >+ApiMigrationScanTab_api_baseline=&API baseline: >+ApiMigrationScanTab_candidate=Candidate: >+ApiMigrationScanTab_usage_scan=Usage Scan: >+ApiMigrationScanTab_api_use_report=API Use Report >+ApiMigrationScanTab_baselines=Baseli&nes... >+ApiMigrationScanTab_brows_e_=Brows&e... >+ApiMigrationScanTab_browse=Bro&wse... >+ApiMigrationScanTab_bundles_matching=Bun&dles matching: >+ApiMigrationScanTab_clean_html_report_dir=Clean &HTML report location >+ApiMigrationScanTab_clean_report_dir=Clean report director&y before reporting new results >+ApiMigrationScanTab_create_html_report=Create HT&ML reports >+ApiMigrationScanTab_description=De&scription: >+ApiMigrationScanTab_enter_report_location=You must enter a report location >+ApiMigrationScanTab_enter_usagescan_location=You must enter a usage scan location >+ApiMigrationScanTab_install_location=D&irectory: >+ApiMigrationScanTab_open_report=Open report when searc&h completes >+ApiMigrationScanTab_references_to=Re&ferences to: >+ApiMigrationScanTab_regex_problem_search_for=Search For regular expression problem: {0} >+ApiMigrationScanTab_regex_problem_search_in=Search In regular expression problem: {0} >+ApiMigrationScanTab_report_location=Report &Output Location: >+ApiMigrationScanTab_reporting=Reporting >+ApiMigrationScanTab_search_for=Search For >+ApiMigrationScanTab_search_in=Search In >+ApiMigrationScanTab_select_install_location=Select the install location >+ApiMigrationScanTab_target_definitions=&Target definition: >+ApiMigrationScanTab_targets=Tar&gets...
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 307996
:
163847
|
163848
|
163949
| 164083