01: /*******************************************************************************
02: * Copyright (c) 2005, 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.jface.text.IRegion;
13:
14: public abstract class ManifestElementHyperlink extends
15: AbstractHyperlink {
16:
17: public ManifestElementHyperlink(IRegion region, String element) {
18: super (region, element);
19: }
20:
21: protected abstract void open2();
22:
23: public void open() {
24: // remove whitespace inbetween chars
25: int len = fElement.length();
26: StringBuffer sb = new StringBuffer(len);
27: for (int i = 0; i < len; i++) {
28: char c = fElement.charAt(i);
29: if (!Character.isWhitespace(c))
30: sb.append(c);
31: }
32: fElement = sb.toString();
33: open2();
34: }
35: }
|