Methods Summary |
---|
private void | fixProject(org.eclipse.core.resources.IProject project)
new Job("Fix Project Properties") {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
if (monitor != null) {
monitor.beginTask("Fix Project Properties", 6);
}
ProjectHelper.fixProject(project);
if (monitor != null) {
monitor.worked(1);
}
// fix the nature order to have the proper project icon
ProjectHelper.fixProjectNatureOrder(project);
if (monitor != null) {
monitor.worked(1);
}
// now we fix the builders
AndroidNature.configureResourceManagerBuilder(project);
if (monitor != null) {
monitor.worked(1);
}
AndroidNature.configurePreBuilder(project);
if (monitor != null) {
monitor.worked(1);
}
AndroidNature.configureApkBuilder(project);
if (monitor != null) {
monitor.worked(1);
}
return Status.OK_STATUS;
} catch (JavaModelException e) {
return e.getJavaModelStatus();
} catch (CoreException e) {
return e.getStatus();
} finally {
if (monitor != null) {
monitor.done();
}
}
}
}.schedule();
|
public void | init(org.eclipse.ui.IWorkbenchWindow window)
// pass
|
public void | run(org.eclipse.jface.action.IAction action)
if (mSelection instanceof IStructuredSelection) {
for (Iterator<?> it = ((IStructuredSelection) mSelection).iterator();
it.hasNext();) {
Object element = it.next();
IProject project = null;
if (element instanceof IProject) {
project = (IProject) element;
} else if (element instanceof IAdaptable) {
project = (IProject) ((IAdaptable) element)
.getAdapter(IProject.class);
}
if (project != null) {
fixProject(project);
}
}
}
|
public void | selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
this.mSelection = selection;
|
public void | setActivePart(org.eclipse.jface.action.IAction action, org.eclipse.ui.IWorkbenchPart targetPart)
|