@xworker.core.relation.ThingRelation
sname
ThingRelation
slabel
ThingRelation
sdescriptors
xworker.lang.MetaDescriptor3
smany
true
seditCols
2
sinitialization
false
smodifier
public
Sdescription
#$@text#$@
<p>事物关联为事物提供关联的工具、帮助、操作等。它的作用是当编辑一个事物时，如果需要获得这个事物的帮助、工具等，那么可以通过绑定到它或者它的描述者上的事物关系实现。</p>
<p>事物关联显示在编辑事物的辅助窗口里，在编辑事物窗口的工具栏中点击辅助可以打开。</p>
<p>例子：</p>
<p>&nbsp;&nbsp;&nbsp; 在元事物中定义的<a href="#" onclick="invoke('thing.xxworker.lang.relations.MetaThingRelation')">基本关联</a>。</p>
#$@text#$@
sid
ThingRelation
@xworker.core.relation.ThingRelation/@actions
sname
actions
sid
actions
slabel
actions
sdescriptors
xworker.lang.MetaDescriptor3/@actions
@xworker.core.relation.ThingRelation/@actions/@GroovyAction
sname
createNoteThing
sisSynchronized
false
sthrowException
true
suseOtherAction
false
svarScope
Global
sdisableGlobalContext
false
Scode
#$@text#$@
import org.xmeta.ActionContext;
import org.eclipse.swt.widgets.Display;

def ac = new ActionContext();
ac.putAll(actionContext);
def display = Display.getCurrent();
def activeShell = display.getActiveShell();
ac.peek().put("parent", activeShell);
def shellThing = world.getThing("xworker.lang.relation.editors.RegistToThingSelector/@shell");
def shell = shellThing.doAction("create", ac);
ac.actions.doAction("init");
shell.open();
#$@text#$@
sdescription
<p>创建笔记事物。</p>
sid
GroovyAction
sdescriptors
xworker.lang.actions.Actions/@GroovyAction
@xworker.core.relation.ThingRelation/@actions/@GroovyAction/@ins
sisValidate
false
sname
ins
sid
ins
slabel
ins
sdescriptors
xworker.lang.actions.Inout/@ins
@xworker.core.relation.ThingRelation/@actions/@GroovyAction/@ins/@thing
sname
thing
stypeCheck
false
soptional
true
scheck
false
scheckLevel
exception
sid
thing
sdescriptors
xworker.lang.actions.Inout/@ins/@param
@xworker.core.relation.ThingRelation/@actions/@getRelationThingPath
sname
getRelationThingPath
sisSynchronized
false
sthrowException
true
suseOtherAction
false
svarScope
Global
sdisableGlobalContext
false
Scode
#$@text#$@
//基本目录放到个人的目录下
//def author = world.getThing("share.author.Author");
def thingPath = "";
//if(author != null){
//    thingPath = thingPath + author.name + ":_work_.";
//}else{
//    thingPath = thingPath + "_noname_:_work_.";
//}

def path = thing.getMetadata().getPath();
def index = path.indexOf(":/");
def childPath = "";
if(index != -1){
    childPath = "\$" + path.hashCode();
    childPath = childPath.replaceAll("-", "_");
    path = path.substring(0, index) + childPath;
}
path = path.replaceAll(":", "."); 
thingPath = thingPath + path;
return thingPath;
#$@text#$@
sinitBreakPoint
false
ssuccessBreakPoint
false
sexceptionBreakPoint
false
seditBreakPoint
false
sinterpretationType
Action
sid
getRelationThingPath
sdescriptors
xworker.lang.actions.Actions/@GroovyAction
@xworker.core.relation.ThingRelation/@actions/@getRelationThingPath/@ins
sisValidate
false
sname
ins
sid
ins
slabel
ins
sdescriptors
xworker.lang.actions.Inout/@ins
@xworker.core.relation.ThingRelation/@actions/@getRelationThingPath/@ins/@thing
sname
thing
stypeCheck
false
soptional
true
scheck
false
scheckLevel
exception
sid
thing
sdescriptors
xworker.lang.actions.Inout/@ins/@param
@xworker.core.relation.ThingRelation/@name
sname
name
slabel
名称
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sid
name
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
@xworker.core.relation.ThingRelation/@label
sname
label
slabel
标签
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sid
label
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
@xworker.core.relation.ThingRelation/@description
sname
description
slabel
描述
sinputtype
html
ssize
60
scolspan
2
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sid
description
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
@xworker.core.relation.ThingRelation/@Category
sname
ThingRelation
slabel
目录
sdescriptors
xworker.lang.MetaDescriptor3/@thing
sextends
xworker.lang.relation.ThingRelation
smany
true
seditCols
2
sinitialization
false
smodifier
public
sid
Category
@xworker.core.relation.ThingRelation/@UI
sname
UI
sdescriptors
xworker.lang.MetaDescriptor3/@thing
smany
true
seditCols
2
sinitialization
false
smodifier
public
sdescription
<p>需要提供一个createUI的方法。</p>
sid
UI
@xworker.core.relation.ThingRelation/@UI/@name
sname
name
slabel
名称
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sid
name
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
@xworker.core.relation.ThingRelation/@UI/@label
sname
label
slabel
标签
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sid
label
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
@xworker.core.relation.ThingRelation/@UI/@extends
sname
extends
slabel
继承
sinputtype
dataSelector
ssize
60
scolspan
2
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sid
extends
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
@xworker.core.relation.ThingRelation/@UI/@description
sname
description
slabel
描述
sinputtype
html
ssize
60
scolspan
2
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sid
description
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
@xworker.core.relation.ThingRelation/@UI/@actions1
sname
actions
slabel
Actions
sdescriptors
xworker.lang.MetaDescriptor2/@thing
sextends
xworker.lang.actions.Actions
smany
true
seditCols
2
Sdescription
#$@text#$@
<p>有过有UI那么需要提供createUI的动作。<br />
&nbsp;&nbsp;&nbsp; 参数：<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; thing<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parent, a org.eclipse.swt.widgets.Composite</p>
<p>如果有Outline需要提供createOutline的动作。<br />
&nbsp;&nbsp;&nbsp; 参数：<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; thing<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parent, a org.eclipse.swt.widgets.Composite</p>
<p>如果有动作需要提供doAction的动作。</p>
#$@text#$@
sid
actions1
@xworker.core.relation.ThingRelation/@UI/@actions1/@name
sname
name
sid
name
sdescriptors
xworker.lang.MetaDescriptor2/@attribute
@xworker.core.relation.ThingRelation/@Action
sname
Action
slabel
动作
sdescriptors
xworker.lang.MetaDescriptor3/@thing
smany
true
seditCols
2
sinitialization
false
smodifier
public
sdescription
<p>需要提供一个doAction的方法。</p>
sid
Action
@xworker.core.relation.ThingRelation/@Action/@name
sname
name
slabel
名称
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sid
name
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
@xworker.core.relation.ThingRelation/@Action/@label
sname
label
slabel
标签
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sid
label
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
@xworker.core.relation.ThingRelation/@Action/@extends
sname
extends
slabel
继承
sinputtype
dataSelector
ssize
60
scolspan
2
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sid
extends
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
@xworker.core.relation.ThingRelation/@Action/@description
sname
description
slabel
描述
sinputtype
html
ssize
60
scolspan
2
LvalidateOnBlur
false
LallowDecimals
false
LallowNegative
false
sid
description
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
@xworker.core.relation.ThingRelation/@Action/@actions1
sname
actions
slabel
Actions
sdescriptors
xworker.lang.MetaDescriptor2/@thing
sextends
xworker.lang.actions.Actions
smany
true
seditCols
2
Sdescription
#$@text#$@
<p>有过有UI那么需要提供createUI的动作。<br />
&nbsp;&nbsp;&nbsp; 参数：<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; thing<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parent, a org.eclipse.swt.widgets.Composite</p>
<p>如果有Outline需要提供createOutline的动作。<br />
&nbsp;&nbsp;&nbsp; 参数：<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; thing<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parent, a org.eclipse.swt.widgets.Composite</p>
<p>如果有动作需要提供doAction的动作。</p>
#$@text#$@
sid
actions1
@xworker.core.relation.ThingRelation/@Action/@actions1/@name
sname
name
sid
name
sdescriptors
xworker.lang.MetaDescriptor2/@attribute
