01: /*******************************************************************************
02: * Copyright (c) 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.editor.text;
11:
12: import org.eclipse.core.resources.IResource;
13: import org.eclipse.jface.text.IRegion;
14: import org.eclipse.pde.internal.ui.editor.schema.SchemaEditor;
15:
16: public class SchemaHyperlink extends AbstractHyperlink {
17:
18: private IResource fResource;
19:
20: public SchemaHyperlink(IRegion region, String schema, IResource res) {
21: super (region, schema);
22: fResource = res;
23: }
24:
25: public void open() {
26: if (fResource != null)
27: SchemaEditor.openSchema(fResource.getProject().getFile(
28: fElement));
29: }
30:
31: }
|