Results 1 to 2 of 2
  1. #1
    Digital Larry is offline Member
    Join Date
    Mar 2013
    Rep Power

    Default Template, or Plug-In, or impossible?

    I've developed a CAD program using Java/Swing under Eclipse. The items that you work with in the CAD program are called blocks. Of course each one is a separate class. Sometimes a block has a control panel that the user can access to change some of the attributes of the block. The control panel and block classes are aware of each other and exchange information via set/get in the block. Finally, each block gets added to the main program's menu in order to be selected for insertion into the current design.

    So, each new block has 2 or 3 classes that need to be dealt with.
    • block - is aware of control panel, if it exists
    • control panel (optional) - is aware of block
    • main (add to menu) - is aware of block

    In addition, much of the time, one of the block's methods will want to import some Java code that is generated by a different process. This is done at compile time, not run time. This process starts with some assembler type code which is then converted into Java. Hard to explain what's going on, but the details are not important other than to say that what I'd like to specify in my model is whether or not this translation needs to occur and if so, what is the source file?

    I am doing all of this manually now and not only is it really tedious but as you might imagine it is a bit error prone even if I copy/paste most of the code from existing classes.

    I read about templates and saw that they could be used for little repetitive tasks like creating set/get methods. However what I'm trying to do is quite a bit more complex. I looked briefly at an Eclipse plug-in development tutorial and I can't tell whether that is a better approach for what I have in mind.

    Any suggestions?
    Last edited by Digital Larry; 07-11-2013 at 11:02 PM.

  2. #2
    Digital Larry is offline Member
    Join Date
    Mar 2013
    Rep Power

    Default Re: Template, or Plug-In, or impossible?

    OK I read a little about Eclipse Modelling Framework. This seems like it might be the right tool for doing this. Anyone out there have experience with EMF and can tell me about how you used it?

Similar Threads

  1. impossible to install java
    By zrx8 in forum New To Java
    Replies: 3
    Last Post: 05-27-2012, 08:16 PM
  2. Impossible error
    By Jressing in forum New To Java
    Replies: 6
    Last Post: 01-15-2012, 05:27 AM
  3. Replies: 3
    Last Post: 12-03-2011, 01:38 PM
  4. Template in JSP
    By jyothi.priyanka in forum New To Java
    Replies: 0
    Last Post: 01-18-2011, 05:29 PM
  5. Impossible or not? restart router through java
    By Questionmark in forum Advanced Java
    Replies: 5
    Last Post: 08-07-2010, 12:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts