input
stringlengths
10
828
output
stringlengths
5
107
public boolean is abstract if is alias return extendable container get real is abstract else return abstract
returns whether this container is abstract or can have
public boolean is final if is alias return extendable container get real is final else return final
returns the value of the code final code property
public void set tbb undo enabled boolean arg1 get tbb undo set enabled arg1
method generated to support the promotion of the tbb undo enabled attribute
public boolean is dependent on element other if is alias return extendable container get real is dependent on other else if other instanceof extendable is extending other return true return false
determines whether or not code this code is dependent on
public element get element class klass string name if is alias return extendable container get real get element klass name else element elt first try find the element in this container elt super get element klass name if elt null return elt second try find the element in inherited containers the recursion should not cause stack overflows because the extension graphs are not very deep if extending null return extending get element klass name there is no such element return null
finds a contained interlis element given its class and name
private element get element string name if name null return null iterator it it contents iterator while it has next element e element it next if name equals e get name return e get element from inherited container if extending null return abstract pattern def extending get element name return null
find an element with the given name in the given namespace
public set get extensions if is alias return extendable container get real get extensions else set result new hash set get extensions recursive helper result return result
calculates a set of all extendables that are extending
private string get sql multi value table name domain def def string buffer ret new string buffer shortcut name get sql name def 15 ch ehi uml1 4 foundation core namespace parent null parent def get namespace add sql name prefix ret parent return get unique sql name def t map ret to string
necessary for descriptor mappings to technical table t map
private void treat next previous buttons get tbb first set enabled browser is scroll first allowed get tbb previous set enabled browser is scroll previous allowed get tbb next set enabled browser is scroll next allowed get tbb last set enabled browser is scroll last allowed get lbl selector set text browser get scroll index string
treat next previous buttons
public void set include null boolean v include null v
include empty object into join if no matching one defined
public boolean add object o if is alias return container get real add o else null is not accepted if o null throw new illegal argument exception only interlis elements can be added if o instanceof element throw new class cast exception try element o set bean context this catch java beans property veto exception pve throw new illegal argument exception pve get localized message boolean was added elements add o if was added bcs fire children added new java beans beancontext bean context membership event this new object o return was added
adds a new element to this container
public void adapt rights user action rights rights if rights null if rights is new object allowed remove get tbb new if rights is read object allowed remove get tbb open remove get tbb find if rights is remove objects allowed remove get tbb delete if rights is save object allowed remove get tbb save remove get tbb undo remove get tbb redo
adapt toolbar according to given rights for the allowed user actions
private element get element string name if name null return null iterator it contents iterator while it has next element e element it next if name equals e get name return e return null
find an element with the given name in the type namespace
private element get runtime parameter string name if name null return null iterator it runtime parameters iterator while it has next element e element it next if name equals e get name return e return null
find an runtime parameter with the given name
public role def find opposide role string role name if role name null return null iterator it get opposide roles while it has next role def e role def it next if role name equals e get name return e return null
find the opposide role with the given name
public list get defined lightweight associations list assocv new array list iterator it get defined target for roles while it has next role def e role def it next if e is association embedded assocv add e return assocv
get the list of associations that have no link object
public list get lightweight associations list assocv new array list iterator it get target for roles while it has next role def e role def it next if e is association embedded assocv add e return assocv
get the list of associations that have no link object
public string get explanation return ili1 explanation
get ili explanation
public boolean is association embedded association def container association def get container return container get role where embedded this
tests if the association that this role is an end of
public boolean has one opp end iterator rolei association def this get container get attributes and roles int rolec 0 while rolei has next object obj rolei next if obj instanceof role def rolec return rolec 2
tests if this belongs to an association with no more than two roles
public boolean is lightweight return get role where embedded null
tests if this association has no link object
public void save try store new java io file settings file ch interlis ili2c main app name catch ioexception e ch ehi basics logging ehi logger log error failed to save settings e
saves the user settings
private void initialize this set content pane get jcontent pane this set size 238 170 this set title about ili2c
this method initializes this
public void error ch interlis ili2c metamodel error listener error event evt string msg evt get message int line evt get line string filename evt get file name if evt get severity error event severity warning if generate warnings ehi logger log adaption filename line msg else ehi logger log error filename line msg
called by the compiler for every error message
public iterator get roles iterator return null
gets role defs defined by this
static public void log adaption string filename int line string adaption ehi logger get instance log event new compiler log event filename line log event adaption adaption null get caller origin
inform user about adaptions taken by the code e
static private stack trace element get caller origin throwable tr new throwable stack trace element stack tr get stack trace stack 0 get origin stack 1 log error stack 2 user code if 2 stack length stack trace element st stack 2 return st return null
gets the origin of a call to log error functions
public boolean is auto complete model list return auto complete model list
tests if compiler looks automatically after required models
public void invoke start int x int y drawing view view set connection create connection point p locate get connection start point p x p y get connection end point p x p y view drawing add get connection
creates the connection
public void invoke step int x int y int anchor x int anchor y drawing view view point p new point x y figure f find connectable figure x y view drawing track the figure containing the mouse if f f target if f target null f target connector visibility false f target f if f target null f target connector visibility true connector target find connection target p x p y view drawing if target null p geom center target display box get connection end point p x p y
tracks the connection
public void invoke end int x int y int anchor x int anchor y drawing view view connector target find connection target x y view drawing if target null get connection connect start start connector get connection connect end target get connection update connection else view drawing remove get connection set connection null if f target null f target connector visibility false f target null
connects the figures if the mouse is released over another
public rectangle display box point p f locator locate owner return new rectangle p x size 2 p y size 2 size size
gets the display box of the connector
public void write storable output dw super write dw dw write storable f locator
stores the arrow tip to a storable output
public void read storable input dr throws ioexception super read dr f locator locator dr read storable
reads the arrow tip from a storable input
protected undoable create undo activity return new change attribute command undo activity view f attribute f value
factory method for undo activity
protected undoable create undo activity return new paste command undo activity view
factory method for undo activity
public void activate super activate if is usable view set cursor cursor get predefined cursor cursor crosshair cursor
sets the cross hair cursor
public void add drawing change listener drawing change listener listener if f listeners null f listeners new vector 2 f listeners add element listener
adds a listener for this drawing
public void mouse down mouse event e int x int y f anchor point new point x y f created figure create figure set added figure view add get created figure get added figure display box f anchor point f anchor point
creates a new figure by cloning the prototype
public void remove drawing change listener drawing change listener listener f listeners remove element listener
removes a listener from this drawing
protected figure create figure if f prototype null throw new jhot draw runtime exception no protoype defined return figure f prototype clone
creates a new figure by cloning the prototype
public figure add figure figure if f figures contains figure figure set zvalue n highest z f figures add element figure figure add to container this add to quad tree figure return figure
adds a figure to the list of figures
public enumeration drawing change listeners return f listeners elements
gets an enumeration with all listener for this drawing
public void mouse drag mouse event e int x int y get added figure display box f anchor point new point x y
adjusts the extent of the created figure
public void figure request remove figure change event e figure figure e get figure if f figures contains figure bugfix this call will cleans up the quad tree as well jy super remove figure f figures remove element figure figure remove from container this will invalidate figure figure release else system err println attempt to remove non existing figure
handles a remove from drawing request that
public void mouse up mouse event e int x int y if get created figure is empty drawing remove get added figure nothing to undo set undo activity null else use undo activity from paste command set undo activity create undo activity put created figure into a figure enumeration get undo activity set affected figures new single figure enumerator get added figure f created figure null set added figure null editor tool done
checks if the created figure is empty
public void figure invalidated figure change event e if f listeners null for int i 0 i f listeners size i drawing change listener l drawing change listener f listeners element at i l drawing invalidated new drawing change event this e get invalidated rectangle
invalidates a rectangle and merges it with the
public void figure request update figure change event e if f listeners null for int i 0 i f listeners size i drawing change listener l drawing change listener f listeners element at i l drawing request update new drawing change event this null
forces an update
public void add all vector new figures add all new figure enumerator new figures
adds a vector of figures
protected undoable create undo activity return new cut command undo activity this
factory method for undo activity
public vector handles vector handles new vector handles add element new null handle this relative locator north west handles add element new null handle this relative locator north east handles add element new null handle this relative locator south west handles add element new null handle this relative locator south east return handles
returns the figures handles
static public void add corner handles figure f vector handles handles add element south east f handles add element south west f handles add element north east f handles add element north west f
fills the given vector with handles at each corner of a
public rectangle display box if f figures size 0 figure enumeration k figures rectangle r k next figure display box while k has more elements r add k next figure display box return r return new rectangle 0 0 0 0
gets the display box
static public void add handles figure f vector handles add corner handles f handles handles add element south f handles add element north f handles add element east f handles add element west f
fills the given vector with handles at each corner
public void add all figure enumeration fe while fe has more elements add fe next figure
adds a figure enumeration of figures
protected point get anchor point sf bug report id 490752 return f anchor point
the anchor point is usually the first mouse click performed with this tool
public void mouse move mouse event evt int x int y drag ndrop tool set cursor evt get x evt get y view
handles mouse moves if the mouse button is up
public void decorate figure figure f component figure f component add to container this
decorates the given figure
public figure remove figure figure return orphan figure
removes a figure from the composite
public figure peel decoration get decorated figure remove from container this set the container to the listener return get decorated figure
removes the decoration from the contained figure
public void mouse up mouse event e int x int y view unfreeze view if f child null jdk1 1 doesn t guarantee mouse down mouse drag mouse up f child mouse up e x y f child deactivate f child null
handles mouse up events
protected tool create handle tracker drawing view view handle handle return new handle tracker editor new undoable handle handle view
factory method to create a handle tracker
public object get data string type if type equals type input stream input new byte array input stream f data vector result new vector 10 storable input reader new storable input input int num read 0 try int count reader read int while num read count figure new figure figure reader read storable result add element new figure num read catch ioexception e system err println e to string return new figure enumerator result return null
gets the data of the selection
public figure enumeration figures vector figures new vector 1 figures add element this return new figure enumerator figures
returns an enumeration of the figures contained in this figure
protected undoable create undo activity return new delete command undo activity this
factory method for undo activity
public void figure changed figure change event e
sent when a figure changed
public void remove all vector figures remove all new figure enumerator figures
removes a vector of figures
public void figure removed figure change event e
sent when a figure was removed
public void figure request remove figure change event e
sent when requesting to remove a figure
public boolean has more elements return f enumeration has more elements
returns true if the enumeration contains more elements false
public object next element return f enumeration next element
returns the next element of the enumeration
protected void delete figures figure enumeration fe while fe has more elements view drawing orphan fe next figure view clear selection
deletes the selection from the drawing
public figure next figure return figure f enumeration next element
returns the next element casted as a figure of the enumeration
public void invoke step int x int y int anchor x int anchor y drawing view view point p new point x y figure f find connectable figure x y view drawing track the figure containing the mouse if f get target figure if get target figure null get target figure connector visibility false set target figure f if get target figure null get target figure connector visibility true connector target find connection target p x p y view drawing if target null p geom center target display box set point p x p y
finds a new target of the connection
public figure find figure inside int x int y return get decorated figure find figure inside x y
forwards find figure inside to its contained figure
public void remove all figure enumeration fe while fe has more elements remove fe next figure
removes a figure enumeration of figures
public vector handles return get decorated figure handles
forwards handles to its contained figure
public void write storable output dw dw write storable f owner
stores the connector and its owner to a storable output
public void remove all figure enumeration fe figures while fe has more elements figure figure fe next figure figure remove from container this f figures remove all elements clear quad tree n lowest z 0 n highest z 0
removes all children
public void read storable input dr throws ioexception f owner figure dr read storable
reads the connector and its owner from a storable input
protected connection figure find connection int x int y drawing drawing enumeration k drawing figures reverse while k has more elements figure figure figure k next element figure figure find figure inside x y if figure null figure instanceof connection figure return connection figure figure return null
finds an existing connection figure
public void activate if view null view clear selection view check damage get event dispatcher fire tool activated event
activates the tool for use on the given view
public void deactivate if is active if view null view set cursor cursor get default cursor get event dispatcher fire tool deactivated event
deactivates the tool
public void orphan all vector new figures orphan all new figure enumerator new figures
removes a vector of figures from the figures list
public figure enumeration decompose vector figures new vector 1 figures add element this return new figure enumerator figures
decomposes a figure into its parts
public void view selection changed drawing view old view drawing view new view if is active deactivate activate check usable
fired when the selected view changes
public void view created drawing view view
sent when a new view is created
public void view destroying drawing view view
send when an existing view is about to be destroyed
public void mouse down mouse event e int x int y f anchor x x f anchor y y
handles mouse down events in the drawing view
public void add figure change listener figure change listener l f listener figure change event multicaster add f listener l
adds a listener for this figure
public void remove figure change listener figure change listener l f listener figure change event multicaster remove f listener l
removes a listener for this figure
public tool tool return my tool
gets the current tool
public figure change listener listener return f listener
gets the figures listners
public void release if f listener null f listener figure removed new figure change event this
a figure is released from the drawing
public void mouse down mouse event e int x int y figure target drawing find figure x y if target null view add to selection target action target
add the touched figure to the selection an invoke action
public void invalidate if f listener null rectangle r display box r grow handle handlesize handle handlesize f listener figure invalidated new figure change event this r
invalidates the figure
public drawing view view return editor view
gets the tools view convienence method
public void will change invalidate
informes that a figure is about to change something that
protected undoable create undo activity return new drag tracker undo activity view new point f last x f last y
factory method for undo activity
public void connector visibility boolean is visible get decorated figure connector visibility is visible
forwards the connector visibility request to its component