]>
git.argeo.org Git - gpl/argeo-slc.git/blob - editors/ModularDistVersionEditor.java
1 package org
.argeo
.slc
.client
.ui
.dist
.editors
;
3 import javax
.jcr
.RepositoryException
;
5 import org
.argeo
.slc
.SlcException
;
6 import org
.argeo
.slc
.client
.ui
.dist
.DistPlugin
;
7 import org
.eclipse
.ui
.IEditorInput
;
8 import org
.eclipse
.ui
.IEditorSite
;
9 import org
.eclipse
.ui
.PartInitException
;
12 * Manage a modular distribution version contained in a specific workspace of a
15 public class ModularDistVersionEditor
extends ArtifactVersionEditor
{
16 private static final long serialVersionUID
= -2223542780164288554L;
18 // private final static Log log =
19 // LogFactory.getLog(ModularDistVersionEditor.class);
20 public final static String ID
= DistPlugin
.PLUGIN_ID
+ ".modularDistVersionEditor";
23 public void init(IEditorSite site
, IEditorInput input
)
24 throws PartInitException
{
25 super.init(site
, input
);
29 protected void addPages() {
30 setPartName(getFormattedName());
32 addPage(new ModularDistVersionOverviewPage(this, "Modules ",
34 addPage(new RunInOsgiPage(this, "Run as OSGi ", getArtifact()));
35 addPage(new ModularDistVersionDetailPage(this, "Details",
37 } catch (PartInitException e
) {
38 throw new SlcException("Cannot add distribution editor pages", e
);
42 protected String
getFormattedName() {
44 String partName
= null;
45 if (getArtifact().hasProperty(SLC_NAME
))
46 partName
= getArtifact().getProperty(SLC_NAME
).getString();
48 partName
= getArtifact().getName();
50 if (partName
.length() > 10) {
51 partName
= "..." + partName
.substring(partName
.length() - 10);
54 } catch (RepositoryException re
) {
55 throw new SlcException("unable to get slc:name property for node "