1 11 12 package org.eclipse.pde.internal.ui.editor.plugin.rows; 13 14 import org.eclipse.pde.core.plugin.IPluginModelBase; 15 import org.eclipse.pde.internal.core.ischema.ISchemaAttribute; 16 import org.eclipse.pde.internal.ui.editor.IContextPart; 17 import org.eclipse.pde.internal.ui.editor.text.TranslationHyperlink; 18 import org.eclipse.swt.widgets.Display; 19 20 24 public class TranslatableAttributeRow extends ReferenceAttributeRow { 25 26 30 public TranslatableAttributeRow(IContextPart part, ISchemaAttribute att) { 31 super(part, att); 32 } 33 34 protected boolean isReferenceModel() { 35 return !part.getPage().getModel().isEditable(); 36 } 37 38 protected void openReference() { 39 TranslationHyperlink link = new TranslationHyperlink(null, text.getText(), 40 (IPluginModelBase)part.getPage().getModel()); 41 link.open(); 42 if (!link.getOpened()) { 43 Display.getCurrent().beep(); 44 } 45 } 46 47 } 48 | Popular Tags |