1 11 package org.eclipse.pde.internal.ui.editor; 12 13 import org.eclipse.swt.dnd.Clipboard; 14 import org.eclipse.swt.layout.GridData; 15 import org.eclipse.swt.widgets.Composite; 16 import org.eclipse.swt.widgets.Control; 17 import org.eclipse.swt.widgets.Label; 18 import org.eclipse.ui.forms.AbstractFormPart; 19 import org.eclipse.ui.forms.IDetailsPage; 20 import org.eclipse.ui.forms.widgets.FormToolkit; 21 22 public abstract class PDEDetails extends AbstractFormPart implements IDetailsPage, IContextPart { 23 24 public PDEDetails() { 25 } 26 27 public boolean canPaste(Clipboard clipboard) { 28 return true; 29 } 30 31 public boolean doGlobalAction(String actionId) { 32 return false; 33 } 34 35 protected void markDetailsPart(Control control) { 36 control.setData("part", this); } 38 39 protected void createSpacer(FormToolkit toolkit, Composite parent, int span) { 40 Label spacer = toolkit.createLabel(parent, ""); GridData gd = new GridData(); 42 gd.horizontalSpan = span; 43 spacer.setLayoutData(gd); 44 } 45 public void cancelEdit() { 46 super.refresh(); 47 } 48 } 49 | Popular Tags |