KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 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.runtime.CoreException;
15 import org.eclipse.pde.core.IBaseModel;
16 import org.eclipse.pde.internal.core.builders.PDEMarkerFactory;
17 import org.eclipse.pde.internal.core.text.build.Build;
18 import org.eclipse.pde.internal.core.text.build.BuildModel;
19
20 public abstract class BuildEntryMarkerResolution extends AbstractPDEMarkerResolution {
21
22     protected String JavaDoc fEntry;
23     protected String JavaDoc fToken;
24     
25     public BuildEntryMarkerResolution(int type, IMarker marker) {
26         super(type);
27         try {
28             fEntry = (String JavaDoc)marker.getAttribute(PDEMarkerFactory.BK_BUILD_ENTRY);
29             fToken = (String JavaDoc)marker.getAttribute(PDEMarkerFactory.BK_BUILD_TOKEN);
30         } catch (CoreException e) {
31         }
32     }
33
34     protected abstract void createChange(Build build);
35     
36     protected void createChange(IBaseModel model) {
37         if (model instanceof BuildModel)
38             createChange((Build)((BuildModel)model).getBuild());
39     }
40 }
41
Popular Tags