KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > correction > UpdateClasspathResolution


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.ui.correction;
12
13 import org.eclipse.core.resources.IMarker;
14 import org.eclipse.core.resources.IProject;
15 import org.eclipse.core.runtime.CoreException;
16 import org.eclipse.pde.core.IBaseModel;
17 import org.eclipse.pde.core.plugin.IPluginModelBase;
18 import org.eclipse.pde.core.plugin.PluginRegistry;
19 import org.eclipse.pde.internal.ui.PDEUIMessages;
20 import org.eclipse.pde.internal.ui.wizards.plugin.ClasspathComputer;
21
22 public class UpdateClasspathResolution extends AbstractPDEMarkerResolution {
23
24     public UpdateClasspathResolution(int type) {
25         super(type);
26     }
27
28     public String JavaDoc getLabel() {
29         return PDEUIMessages.UpdateClasspathResolution_label;
30     }
31
32     public void run(IMarker marker) {
33         IProject project = marker.getResource().getProject();
34         IPluginModelBase model = PluginRegistry.findModel(project);
35         try {
36             ClasspathComputer.setClasspath(project, model);
37         } catch (CoreException e) {
38         }
39     }
40
41     protected void createChange(IBaseModel model) {
42         // handled by run
43
}
44
45 }
46
Popular Tags