Giter Site home page Giter Site logo

umple / umple Goto Github PK

View Code? Open in Web Editor NEW
238.0 36.0 197.0 98.6 MB

Umple: Model-Oriented Programming - embed models in code and vice versa and generate complete systems

Home Page: https://www.umple.org

License: MIT License

HTML 1.44% Java 84.26% MATLAB 0.01% Lex 0.02% GAP 2.19% Ruby 0.83% Shell 0.05% PHP 1.16% CSS 0.19% JavaScript 9.50% Xtend 0.01% Python 0.10% Dockerfile 0.01% Hack 0.01% TXL 0.20% PowerShell 0.01% Batchfile 0.01% Roff 0.01% TypeScript 0.04%
umple state-machine uml modeling code-generation class-diagram editor

umple's Introduction

Umple Modelling Language

Build Status

OS Linux Jenkins Windows Appveyor
Status Jenkins Linux Build status Windows Build status

Description

This is the main project for various Umple subprojects and components.

Umple is a model-oriented programming technology, allowing developers to embed modelling concepts (e.g. UML associations, state machines), patterns, generation templates, and other abstractions in traditional code, and vice versa. It generates high quality code for Java, C++ and PhP (Python in beta), as well as diagrams, metrics and many other artifacts. It can be embeded in the above languages as well as embed them.

The project homepage is located at https://umple.org/

There are a large number of scientific papers about Umple listed at: https://umple.org/publications

Cite the overall project as: Timothy C. Lethbridge, Andrew Forward, Omar Badreddin, Dusan Brestovansky, Miguel Garzon, Hamoud Aljamaan, Sultan Eid, Ahmed Husseini Orabi, Mahmoud Husseini Orabi, Vahdat Abdelzad, Opeyemi Adesina, Aliaa Alghamdi, Abdulaziz Algablan, Amid Zakariapour, "Umple: Model-Driven Development for Open Source and Education", Science of Computer Programming, 2021, https://doi.org/10.1016/j.scico.2021.102665.

Cite latest software release as: University of Ottawa, Umple, https://umple.org/releases https://doi.org/10.5281/zenodo.4677562 DOI

Development Process

Umple is developed in itself, guaranteeing robustness; the most recent version of the compiler must be used to compile itself. See the wiki for development setup: https://umple.org/devsetup

Development follows a model-driven, test-driven, agile, continuous-integration process. Umple is hosted currently on Github at https://umple.org/code . It was first released in 2007. The master was on Google Code from 2011 to mid 2015 and moved to Github in 2015.

Umple has been largely developed as a research project at the University of Ottawa, Canada, by numerous PhD and masters students. Many undergraduates from across Canada and the USA have also contributed through the UCOSP program. See the license file for the list of contributors. https://umple.org/license

Installation and Downloading

Umple does not need necessarily to be downloaded, the following allow you to run it directly in any web browser:

You can download the java jar for command-line use, or the Eclipse plugin:

  • Download page: https://umple.org/dl - Links to the latest official release and continuous builds (command-line, Eclipse, Docker)

To run locally on your machine, Umple needs Java (versions 8 and up although 17 is recommended) installed. It runs on Mac, Linux and Windows.

Usage

Umple is a programming and modeling language with a rich syntax. Full documentation with many examples can be found at

Other Key links

Umple is continuously tested and built on its own Jenkins server (see https://jenkins.umple.org) . It is also built on Appveyor (https://umple.org/appveyor/).

Contributing

License

Umple is licensed under the MIT license. See https://umple.org/license

Credits

All developers of Umple are listed in the license file at https://umple.org/license

Financial support has been received from NSERC and the Ontario Research Fund. IBM supported early development of Umple. Google and Facebook supported student travel during Umple's development.

Contents of the directories

The umple project is split into many smaller subprojects; the folder hierarchy is explained below to better describe the structure.

  • build/

    • Ant build scripts and related information including user manual raw data
  • cruise.umple/ Umple compiler

    • See its own ReadMe.txt for further details
    • See also UmpleTo* below for additional compiler components
  • cruise.umple.eclipse/, cruise.umple.xtext.ui/ Eclipse plugins

  • cruise.umplificator Converting outside code to Umple

    • cruise.umple.validator Validates umple when umplifying
  • cruise.umple.nebula Infrastructure used for real-time C++

  • dev-tools Tooling for Umple developers

  • dist Build produced items, only available after building

    • libs/ Managed build dependencies that umple.jar require to run*
    • cruise.umple/reference User manual
    • qa/ Test reports
    • umple.jar and umple.VERSION.jar Current command-line Compiler
    • umpledocs.VERSION.jar User manual generator
    • umplestats.VERSION.jar Statistics generation
    • umplesync.VERSION.jar UmpleOnline tool to to synchronize graphical form
    • umplerun.VERSION.jar tool to drive input to an umple program
    • vml.VERSION.jar * Extension for variability modeling*
    • umple.unit-test.jar Test Language Compiler
    • umple.mutation.jar Umple Mutant Generator
  • examples/ Developer curated examples

  • externalexamples/ External projects that are used for testing

  • ExternalTextEditorPlugins Plugins for external editors, Notepad++, etc

  • sandbox Small test done before a build to make sure testing and compiling works

  • testbed/, testbed_php/, testbed_ruby/ Test suites for Java, Php and Ruby respectively

  • UmpleToJava/ Code generation for Java

  • UmpleToPhp/ Code generation for Php

  • UmpleToRuby/ Code generation for Ruby

  • UmpleToRTCpp/ *Code generation for C++ *

  • UmpleToSDL/ Code generation to convert Umple to SDL (in early development)

  • UmpleToSql/ Code generation SQL from Umple models

  • UmpleToTest/ Code generation for abstract tests

  • UmpleToTemplate/ Location for templates that could be common to subprojects

  • UmpleTToJunit/ Code Generation for JUnit5 - used by MTL compiler

  • UmpleTToPhpunit/ Code Generation for PhpUnit - used by MTL compiler

  • UmpleTToRubyunit/ Code Generation for RubyUnit - used by MTL compiler

  • umpleonline/ The UmpleOnline web application

    • UmpleOnline allows generation of code from Umple directly in a web browser, and also editing of Umple both graphically and textually. Available at https://try.umple.org
  • Umplificator/ Reverse engineer code to Umple

  • umplificatoronline/ Online tool for converting code to Umple

  • umpleUI/ Projects for the UIGU tooling

    • Projects for generating a UI through UIGU from Umple. These need work to incorporate them into UmpleOnline
  • umplewww/ Core files from the Umple.org web pages

    • Includes items such as the user manual that are moved at build time into the appropriate place

umple's People

Contributors

a3994288 avatar aforward avatar ahmedvc avatar alamebird avatar ali-fatolahi avatar axeltwc avatar craigbryan avatar databean avatar fjtheknight avatar fredwei-git avatar gublan24 avatar hjamaan avatar jblang94 avatar nava2 avatar obahy avatar opeyemiadesina avatar pwang347 avatar ralphngassa avatar redeyedmars avatar runqingz avatar shikib avatar sultaneid avatar superchentao avatar svetlana154 avatar timlethbridge avatar tlapr231 avatar vahdat-ab avatar weiqimaster avatar yukangyin97 avatar zainabalshowely avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

umple's Issues

Add keyboard shortcuts in the UmpleOnline editor

Originally reported on Google Code with ID 49
Owned by charleshayashi


Add some keyboard shortcuts in the graphic editor. To make this available, I would also
consider having a focus like feature to highlight which side of the editor is current
in use (text or graphical).

The keyboard shortcuts include:

a) Arrow keys to move selected items (classes, associations lines, etc)

b) "Del" to delete an item

There are potentially others (see below), but I think having the two above would greatly
improve the usability of the graphical editor so that you can do very detailed layouts.

Other ideas include

c) "Tab" to shuffle through items

d) "??" to see the code ("??" -> not sure which shortcut to use)

e) Shift-Plus (+) to enlarge the image

f) Shift-Minus (-) to shrink the image


Reported by @umple on 2011-06-23 20:45:30

Allow bends in UmpleOnline asociations

Originally reported on Google Code with ID 44


In order to allow certain nice-looking layouts UmpleOnline and the Umple diagram language
need to be enhanced to handle bends.


Reported by @umple on 2011-06-23 20:37:37

In UmpleOnline launch UIGU directly in browser

Originally reported on Google Code with ID 31


Currently, UIGU doesn't pop up.

At one time it poppe up with Java Web Start and a grey box window appears while the
application is being generated. When Julian releases a new version of JFXProvider,
the UIGU should be started as an applet inside a new tab of the browser.


Reported by @umple on 2011-06-23 18:53:30

Add images to Umple's xtext outline view

Originally reported on Google Code with ID 100
Owned by @obahy


The xtext plugin is using the default images in the outline view. This should be enhanced
with more appropriate images, perhaps adopting the same images as available in other
open source UML tools.


Reported by @umple on 2011-06-24 14:52:18

  • Attachment: xtext_screenshot.png
    xtext_screenshot.png

Provide a restful service for displaying UML diagrams in websites

Originally reported on Google Code with ID 91
Owned by @umple


Similar to Yuml, provide a restful URL for returning UML diagrams based on Umple.

I am picturing something like:

http://cruise.site.uottawa.ca/umpleonline/png.php?model=blah.ump

Which would return a PNG of the model defined by blah.ump.

  1. The ability to just display the UML diagram from a saved umple file

  2. The ability to 'freeze' a saved file so what appears can be constant.

  3. A screen scraping like look to convert html into a PNG (or something similar)

If this is not possible, we might provide a javascript alternative (where we wrap

<script>Umple.load("blah.ump","mydiv")</script>

Which could create an iframe based on the above


Reported by @umple on 2011-06-24 14:28:18

In the umpleonline simulator, display the type of the available arguments to methods

Originally reported on Google Code with ID 64


Currently the arguments are named, but the user of the simulator can't readily tell
what type they are.

getName() is being used successfully to get the name of the parameter.

I expected to be able to use getType(), which returns a ReflectionClass object, and
then getName() to get the parameter type. But this fails with error:

Fatal error: Call to a member function getName() on a non-object.

As an alternative, I tried using PHP's gettype(), is_object() and get_class(), but
this always returns "ReflectionParameter".

Anyone have other ideas?


Reported by @umple on 2011-06-23 21:18:24

Provide proper feedback for syntax and semantic errors

Originally reported on Google Code with ID 66


When errors occur during compilation, provide better feedback for the command line,
Eclipse and umpleonline environments.

For the compiler this means simply giving more meaningful error messages regarding
both syntax and semantics.

For UmpleOnline this means

a) Adding line numbers to the text editor

b) Pointing the user to the location of the error (currently nothing happens at all)

c) Not even allowing generation while there is an error.

d) Showing the syntax and semantics errors in the screen

If you are interested, we could look at some jquery like effects to highlight the textarea
directly. We would also need to build up a library of messages for errors (currently
the system only says "Syntax error on line 12, character 3, but not why)


Reported by @umple on 2011-06-23 21:28:00

Uncompilable code from directed association

Originally reported on Google Code with ID 136
Owned by @umple


The following was raised by
Augustin Petrovic [email protected]
an external Umple user

2.When you are using generalization and there is an list field in class
from which you derive, java code generator generates uncompilable code.
For instance:
class Schedule
{
isA IEntity;
1 -> 1..* Run;
}

class SpecialSchedule
{
isA Schedule;
Date occurenceStart;
Date occurenceEnd;
}

generates constructor public SpecialSchedule(Run... allRuns, Date aOccurenceStart,
Date aOccurenceEnd) for which compiler for which
throws an error ?The variable argument type Run of the method
SpecialSchedule must be the last parameter?.


Reported by @umple on 2011-06-24 21:06:46

Add qualifier notation to UmpleOnline

Originally reported on Google Code with ID 133


Add UML qualifier syntax to UmpleOnline once unique on associations is done, which is
issue 88.


Reported by @umple on 2011-06-24 20:59:16

Error in generated Java when multiple associations with similar mutliplicities are defined between two same classes

Originally reported on Google Code with ID 16
Owned by @umple


Enter the following code in umple editor (eclipse or umpleonline) and generate the Java
code. Classes SourceRelationship and SourceObject have duplicate attributes. Bug can
be worked around by adding roles to each side of the associations.

class Relationship {}

class SourceRelationship{
isA Relationship;

  • -- 1 SourceObject;
  • -- 1 SourceObject;
    }

class SourceObject {}


Reported by @umple on 2011-06-23 17:58:00

Before/after filters not available on all state machine methods.

Originally reported on Google Code with ID 119
Owned by @obahy


Before/after filters are not available for all state machine methods.

Example:
With the following, no code is injected into the getStatus method of class Coordinate.

class Coordinate
{
status {explicit, undefined, defaulted}

after setStatus { System.out.println("status set."); }
}


Reported by @umple on 2011-06-24 15:04:50

Implement unique on an association

Originally reported on Google Code with ID 88


This only applies to association ends with a multiplicity UB <= 1.
This has the effect of implementing qualfiers in UML.

class Flight
{

  • -- 0..1 Airline;
    unique Integer flightNumber on airline;
    }

class Airline
{

}

In the example above, the uniqueness is defined to a particular association. The generated
code would look similar to.

public class Flight
{
//Add the following code injection before code generation
before setflightNumber { if (airline != null && airline.containsFlightNumber(getFlightNumber()))
{ return false; } }

}

public class Airline
{

//Add the following code injection before code generation
before addFlight { if (aFlight != null && containsFlightNumber(aFlight.getFlightNumber()))
{ return false; } }

// this could be enhanced later to cache the information, but leave that for a later
date
public boolean containsFlightNumber(int flightNumber)
{
//pseudo code
for(Flight flight : getFlights())
{
if (flight.getFlightNumber() == flightNumber)
{
return false;
}
}
return false;
}

}


Reported by @umple on 2011-06-24 14:16:48

Naming conflict in generated XML when association is reflective

Originally reported on Google Code with ID 29


When a class has an association and no role names are explicitly defined, the class
name is used by default to name the association ends. If the association is reflective,
both ends are identified in the same manner, and a naming conflict arises. This prevents
Papyrus from being able to load the uml file and generate the model.

To reproduce, enter the following code in the UmpleOnline text editor, and generate
Papyrus XML. The reflective association has a naming conflict between its two ends.
Please see attached image for more details or attached Word document for other examples.

class Person{

  • -- 0..1;
    }

Error can be avoided by giving either association end a role name as follows.

class Person{

  • -- 0..1 spouse;
    }

Reported by @umple on 2011-06-23 18:43:29

Improve ability to save and load umple files using DropBox API

Originally reported on Google Code with ID 85


Currently the user can request a bookmarkable URL. Multiple users can collaborate to
change the model, but they have to take turns.

However, improvements include:

  • Some form of security to limit who can change the model.
  • Ability to delete the model.
  • Ability to purge the oldest models that have not been looked at.
  • Adding version control so people can revert to earlier versions of their
    model.
  • Ability to add a nice name, rather than the generated integer.
  • Ability to promote models into a catalog, and/or the official list of
    examples.

Reported by @umple on 2011-06-24 14:02:27

Ensure association position information is based on alphabetical order, not order of appearance in the umple model

Originally reported on Google Code with ID 77


Ensure association position information is based on alphabetical order, not order of
appearance in the umple model. This ensures that as associations and classes are moved
around, you don't end up having errors appear in the positions.

Reported by Andrew Forward | July 20th, 2010 @ 10:04 PM

class B
{
0..1 -- * A;
}

class A
{

}

class B
{
position 50 30 109 41;
position.association A__B 30,41 74,0;
}

class A
{
position 50 130 109 41;
}

The position for A__B should be the opposite (74,0) refers to A and (30,41) refers
to B.

Comments and changes to this ticket

Julie Filion
Julie Filion July 26th, 2010 @ 05:29 PM
    → State changed from “new” to “open”

Does this mean that classOne of the association should no longer be the class in

which the association is defined, but rather the class that is alphabetically smaller?
Andrew Forward
Andrew Forward July 26th, 2010 @ 05:40 PM

I think that makes the most semantic sense, that way the position is
unambiguos regardless of where the association is defined. Here is how I
think it should change:

classOne and classTwo stay as is for now (once we drop the
associationVariable, we will actually point to associationEndOne and
associationEndTwo.

Introduce some derived attributes (still don't exist yet, so must be written
by hand - example shown below) such as (feel free to rename):

classLeft and classRight (later renamed to associationEndLeft and
associationEndRight)


//TODO: replace with derived attributes / association
UmpleClass classLeft;

before getClassLeft {
    // code to determine which name is smaller
  }

Once the derived attribute / association is in place, the Umple code might
look like:


//TODO: replace with derived attributes / association
UmpleClass classLeft = { /* code to determine which name is smaller */ }

Julie Filion
Julie Filion July 26th, 2010 @ 06:11 PM

Thanks. Which class would the derived attribute be added to?
Andrew Forward
Andrew Forward July 26th, 2010 @ 06:17 PM

Same class as classOne and classTwo (don't have the code in front of my
right now - just going from memory - if this doesn't make sense, assign the
bug to me with the question and I will answer it and pass it back to you).
Julie Filion
Julie Filion July 26th, 2010 @ 07:02 PM
    → Assigned user changed from “Julie Filion” to “Andrew Forward”

Sorry, I am being unclear.

ClassOne and classTwo are not attributes of any class - they are simply named this

way in the json generator. When the UmpleParser finds an association token, it creates
two AssociationEnd instances.

The first refers to the class in which is defined the association (if it is inline)
ie:
class A{ -- B;}

or the class on the left of the definition (if it is explicit)
ie. association{ A -- B; }

The AssociationEnds are then used to create a new Association and add it to the

model.

Would it be reasonable to add an after filter to the Association constructor that

would swap the left and right ends if they are not in the correct order?

There is a method setEnds in class Association - can this be used to reset the

ends? I don't think I fully understand what this method is doing before it sets the
ends.
Andrew Forward
Andrew Forward July 26th, 2010 @ 07:16 PM

Good analysis, but I would instead rely on lazily determining classOne,
classTwo - otherwise you run into issues where you change the role name, you
will also need to check if you need to change the ordering.

One thing to remember is that Umple is written in Umple, so it sometimes
lacks the newest umple features. So, this might be an opportunity to
refactor to use after filter.

I believe the setEnds is in place because when parsing the code you don't
always have both classes defined - so you need to hold on to the first
object until you encounter the second.

Image parsing

class X
{
  0..1 -- 1 Y;
}

class Y {}

When you encounter the "0..1", you have yet to define Y, so you cannot
create the association yet. Only once the whole application is parsed can
you then setEnds.

Reported by @umple on 2011-06-24 13:50:43

Fix up web based reference manual for Umple

Originally reported on Google Code with ID 24
Owned by @umple


There are numerous errors in the web-based documentation for Umple. For
example

http://cruise.site.uottawa.ca/umple/associationClassDefinition.html

shows
code that doesn't compile. Also there are many usabilty issues, for
example the grammar is virtually unreadable (even som spaces would help
tremendously) and should be a link very near the end of the left hand
margin menu since it will not be what beginners will want to look at.

Also much of the reference manual is confusing

Tim Lethbridge is working on this


Reported by @umple on 2011-06-23 18:20:21

Create a wikipedia entry for Umple

Originally reported on Google Code with ID 50
Owned by @umple


Daniel Amyot has agreed to create a wikipedia entry. Umple has various publications
and usage by external people, so this is legitimate. Once this occurs we can also arrange
for it to be in the list of UML tools page of wiki, which should gain some exposure
(we are already in the list of code generation tools).


Reported by @umple on 2011-06-23 20:50:30

Support multiplicities for List attributes

Originally reported on Google Code with ID 96


The following should be supported by the syntax.

String[] a;
String[0..1] b; // eq to String b = null;
String[1] c; // eq to String b;
String[] d;
String[0..10] e;
String[4] f;
String[2..4] g;
String[2..
] h;


Reported by @umple on 2011-06-24 14:31:01

Generated java code of singleton class makes call to undefined constructor

Originally reported on Google Code with ID 26
Owned by angelus.tenebrae


Enter the following code in editor and generate Java code. The method getInstance()
makes call to an empty constructor, which has not been defined.

class Airline{
singleton;
owner;
}

Relevant segment of Java code generated:

//------------------------
// CONSTRUCTOR
//------------------------
private Airline(String aOwner)
{

owner = aOwner;

}

public static Airline getInstance()
{

if(theInstance == null)
{
theInstance = new Airline();
}
return theInstance;

}


Reported by @umple on 2011-06-23 18:27:50

Change autounique to support Integer and String implementations

Originally reported on Google Code with ID 101


  1. Int use 1,2,3,4...
  2. String use a,b,c..aa,bb,...

autounique blah;

The above code should now default to String not Integer.

See the implementation for Unique and build on top of that.

Also extend the implementation to support derived mechanism for more complex autounique.

autounique x = { moreComplexCalculation(); }


Reported by @umple on 2011-06-24 14:54:06

Add state machines to the UmpleOnline visual editor - and at the same time allow multiple diagrams

Originally reported on Google Code with ID 51


The core issue here is to allow state machines to be visualized in UmpleOnline.

However, in general, state machines are encapsulated within classes, so
the ability to show either the state machine or the class diagram would be needed.
And there might be more than one state machine.

Therefore this project requires considerable user interface analysis as well as UI
design and enhancement of the diagram language.

Do we have an expand/collapse button within the a class?

Do open new tabs on top of the editor? And if so, then maybe there
in fact can be several class diagrams showing different aspects of a model.


Reported by @umple on 2011-06-23 20:56:43

Need factory mechanisms

Originally reported on Google Code with ID 127


In the following code, A has a method to create a B. But there is no way
anywhere to create any subclass of B (C or D). This means people have to
write extra boilerplate code.

class A
{ * -- 1 B; }

class B
{ bAttr; }

class C
{ isA B; cAttr; }

class D
{ isA B; dAttr; }

Simple extra methods in A to create and add each subclass of B would be
one solution. See the FactoryMethod and AbstractFactory patterns for other
solutions.


Reported by @umple on 2011-06-24 20:34:42

When changing role names, also update association positions

Originally reported on Google Code with ID 60


class A
{

  • -- * B;
    }
    class B {}

Second step, move the association in the graphical editor

Third step: Add a role name:

class A
{

  • -- * B theB;
    }

class B {}

Result, the positioning of the association is lost.

The UmpleSync process should update the association name from AB to AB:theB


Reported by @umple on 2011-06-23 21:10:18

Assign default positions after parsing rather than during.

Originally reported on Google Code with ID 121


Now that a status has been added to the Coordinate class, the next step will be to assign
default class positioning after parsing rather then when a class is added to the UmpleModel.

When a class is added to the UmpleModel, it has not yet been assigned an explicit position,
so a default is always used.

Comments and changes to this ticket

Julie Filion
Julie Filion September 24th, 2010 @ 01:01 PM
    → State changed from “new” to “open”

Implemented. Classes with explicitly defined positions no longer consume a default

position.
Julie Filion
Julie Filion September 24th, 2010 @ 06:42 PM

There are some issues with the tristate and laying out new elements by default:

For reference, the following is the layoutNewElements() method that is called at

the end of parsing.

private void layoutNewElements()
  {
    int numDefaults = 0;
    for (int i=0; i<model.numberOfUmpleClasses(); i++)
    {
      UmpleClass c = model.getUmpleClass(i);

      if (c.getPosition().getStatus() == Coordinate.Status.Defaulted)
      {
        numDefaults += 1;
      }
      else if (c.getPosition().getStatus() == Coordinate.Status.Undefined)
      {
        numDefaults += 1;
        c.setPosition(model.getDefaultClassPosition(numDefaults));
        c.getPosition().setStatus(Coordinate.Status.Defaulted);
      }
    }
  }

I will try to explain the issue with an example:

Say the following code is entered into the UmpleOnline text editor

class Student
{
}
class Mentor
{
}
class University
{
}
class University
{
  position 400 400 109 41;
}

The following will occur (amongst other things) when the text is captured and sent

to the back end:

a. The Umple code will be parsed - during which an UmpleModel instance will be

created to represent it.

b. Elements which have not been laid out (ie. position status is Undefined) will

be assigned a default position using method layoutNewElements() shown above.

  - Explicitly positioned elements will be skipped
  - Elements positioned by default will *consume* a default spot (in this case

there are none)

c. The updated Umple Code returned will look like:

class Student
{
}
class Mentor
{
}
class University
{
}
class University
{
  position 400 400 109 41;      //this was explicit
}
class Student
{
  position 50 30 109 41;       //this is a default
} 
class Mentor
{
  position 50 130 109 41;      //this is a default
}

d. The diagram will then be updated to match the new code.

Now say I add a new class "Professor" by adding class Professor {} to the text

in the model editor.
I would expect class Professor to be assigned a new default position below classes
Student and Mentor. However, when the update is made, the back end will agin parse
the umple code and create a new UmpleModel to reflect it. The positions of classes
Student and Mentor will be interpreted as Explicit, because we are dealing with a new
model, and they are defined in the Umple code.

So when the new elements are laid out, Professor will be given the first default

slot, because it is the only Defaulted element. As a result, classes Student (which
had the first slot initially)and class Professor will overlap. This will occur every
time classes added require a default position.

I think this could be partially defeating the purpose of having the tri-state on

positions - since the position statuses are reset on every text update, we cannot rely
on them to layout new elements.

As a temporary solution to this, I will revert to the functionality we had before,

where each class in the model consumed a default position.

Anybody have any comments or suggestions about this?

Thanks,

Julie

Reported by @umple on 2011-06-24 15:06:48

Minor discrepancies in UmpleOnline between browsers

Originally reported on Google Code with ID 30
Owned by @umple


In Google Chrome and Safari the associations and generalizations don't connect properly
to the boxes. In general, they connect properly in FireFox. Even though low priority,
this should be fixed before attempting to add new features to UmpleOnline.


Reported by @umple on 2011-06-23 18:50:27

Association class syntax consistency

Originally reported on Google Code with ID 131
Owned by atojet


The following logically should work. but does not

class Student {}

class CourseSection {}

associationClass Registration
{

  • Student -- * CourseSection;
    String grade;
    }

The following works, but is not as clear (although it does allow for potentially future
ternary associations.

class Student {}

class CourseSection {}

associationClass Registration
{

  • Student;
  • CourseSection;
    String grade;

}


Reported by @umple on 2011-06-24 20:51:27

Code generation error from lazy attribute

Originally reported on Google Code with ID 132
Owned by @umple


class Student
{
lazy String name;
}

Notice that name is not a parameter in the generated constructor, but is referenced
in the body.


Reported by @umple on 2011-06-24 20:54:22

Allow developers to replace generated code - aspect-oriented around syntax

Originally reported on Google Code with ID 102
Owned by @aforward


Draw upon more aspect-oriented approaches and introduce the around keyword. We need
to discuss the semantics of around which replaces the current implementation, and in
particular how around deals with other advice such as before and after, as well as
multiple arounds.


Reported by @umple on 2011-06-24 14:57:11

Unclear semantics in simulator and PHP for equality

Originally reported on Google Code with ID 69


In PHP, the default equals method "==" is based on attribute equality not instance quality
(which is "===").

class X
{
name;
}

So when simulating the code above we would see "new X one" and "new X one" as the same
object. I think I want to keep this PHP convention in place (Umple needs to adapt to
its environment, not the inverse); so I think the way around this is to map objects
in the simulator against their "object_id", which in PHP is:

$obj = new X("one");
spl_object_hash($obj);


Reported by @umple on 2011-06-23 21:35:50

Xtext - bug with generalization and positioning

Originally reported on Google Code with ID 46


A class referenced in a generalization is not found if it has more than one class token
(ie. one for the model and one for layout information).

Example: Enter the following code using Eclipse and the Xtext plug-in.

class Student
{
}
class Mentor
{
isA Student;
}
class Student
{
}


Reported by @umple on 2011-06-23 20:39:56

Free up default layout position after setPosition

Originally reported on Google Code with ID 59


Currently, all classe in the UmpleModel will consume a default position. Even if the
class is given a new position, other classes will not be able to use its original default
position.

This means that if you add a class textually, then move it, then add a new class textually,
the new class will not be located in the first blank screen area.

Some initial work was done on this by Julie.

A status attribute was added to class Coordinate to solve this issue. (ie. do not

assign a default position to a class if its position's status is EXPLICIT.)

However, because there is no persistent model in UmpleOnline - a new instance of

model is created everytime the text is parsed (triggered by typing in the text editor)

  • and all previous statuses are overwritten.

    Julie is not sure what should be done about this. Any thoughts?


Reported by @umple on 2011-06-23 21:05:07

Implement the unique keyword

Originally reported on Google Code with ID 87
Owned by kkigunda


Implement the unique constraint

class X
{
unique String a;
}

Resulting in code similar to (a mixture of Umple and Java)

public class X
{
private static ArrayList() allAs = new ArrayList();

//Add the following code injection before code generation
before setA { if (containsA(aA)) { return false; } }
before setA { String oldA = a; }
after setA { if (wasSet) { allAs.remove(oldA); allAs.add(a) } }

public static boolean containsA(String aA)
{
return allAs.contains(aA);
}

}

Testing of this should start with dev_umple and should implemented in Java, PHP and
Ruby. This would be a good learning exercise.


Reported by @umple on 2011-06-24 14:13:22

Hide constants from class diagram

Originally reported on Google Code with ID 78
Owned by @CraigBryan


class A
{
const DEFAULT_NAME = "andrew";
name;
}

The "DEFAULT_NAME" should not show up in the diagram. The ideal solution would quality
the json output and then the diagraming tool could decide how to display the information.


Reported by @umple on 2011-06-24 13:53:03

When generating code for a new association during synchronization, add role name if association is reflexive

Originally reported on Google Code with ID 123
Owned by @CraigBryan


Currently, creating a reflexive association in the diagram will generate code that does
not compile because neither ends of the association are given a role name. It is done
by clicking 'association' and then twice on the same class. It draws the association,
but then fails to generate Umple.

Also, intersection algorithm for determining association end positions should have
a special case to handle clicking the same class twice (dont look for an intersection

  • there won't be any).

Reported by @umple on 2011-06-24 20:30:44

Error in generated Java constructor (wrong template used)

Originally reported on Google Code with ID 21
Owned by @umple


Enter the following code in Eclipse plug-in and generate Java code. An invalid constructor
appears in class ModelRelationship (generator seems to be using an inapropriate template).

class ModelObject{}
class ModelElement{
isA ModelObject;
}
class ModelRelationship{
isA ModelObject;

  • toModelRel1 -- 1 ModelElement toModelElem1;
  • toModelRel2 -- 1 ModelElement toModelElem2;
    }
    class Relationship{}
    class RelationshipInModel{
    isA Relationship;
    1 -- 1 ModelRelationship;
    }

The ModelRelationship class is the following.

public class ModelRelationship extends ModelObject
{
//------------------------
// MEMBER VARIABLES
//------------------------

//ModelRelationship Associations
private ModelElement toModelElem1;
private ModelElement toModelElem2;
private RelationshipInModel relationshipInModel;

//------------------------
// CONSTRUCTOR
//------------------------

public ModelRelationship(ModelElement aToModelElem1, ModelElement aToModelElem2,
RelationshipInModel aRelationshipInModel)
{

super();
boolean didAddToModelElem1 = setToModelElem1(aToModelElem1);
if (!didAddToModelElem1)
{
throw new RuntimeException("Unable to create toModelRel1 due to toModelElem1");
}
boolean didAddToModelElem2 = setToModelElem2(aToModelElem2);
if (!didAddToModelElem2)
{
throw new RuntimeException("Unable to create toModelRel2 due to toModelElem2");
}
if (aRelationshipInModel == null || aRelationshipInModel.getModelRelationship() !=
null)
{
throw new RuntimeException("Unable to create ModelRelationship due to aRelationshipInModel");
}
relationshipInModel = aRelationshipInModel;

}

public ModelRelationship(ModelElement aToModelElem1, ModelElement aToModelElem2)
{

super();toModelElem1s = new ArrayList<ModelElement>();
toModelElem1s.add(aToModelElem1);
registry.add(toModelElem1s);toModelElem2s = new ArrayList<ModelElement>();
toModelElem2s.add(aToModelElem2);
registry.add(toModelElem2s);
relationshipInModel = new RelationshipInModel(this);

}

The constructor generating the errors is

public ModelRelationship(ModelElement aToModelElem1, ModelElement aToModelElem2)


Reported by @umple on 2011-06-23 18:17:01

Complete generation of abstract in php

Originally reported on Google Code with ID 76


class X
{
abstract;
}

Or,

abstract class X
{

}

The first syntax is suggested even though it is against the convention in other languages.
We already can declare a class as 'singleton'.

Doing this would require also changing UmpleOnline to allow marking a class as abstract.
There are metamodel and code generation implications.


Reported by @umple on 2011-06-24 13:41:07

Missing opening <ownedAttribute> tags in generated XML when attributes are of non-primitive types

Originally reported on Google Code with ID 28
Owned by tianyuan.chu


Enter the following umple code in the UmpleOnline text editor and generate Papyrus XMI.
The opening tag as well as its embedded tag are missing. This prevents
Papyrus from being able to load the uml file and create its model.

Please see attached Word document for an examples.

class Car{
Float value;
}


Reported by @umple on 2011-06-23 18:39:44

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.