Bug 109188 - "Add Merge Markers to Existing Source Elements" checkbox is not functioning correctly
"Add Merge Markers to Existing Source Elements" checkbox is not functioning c...
Status: VERIFIED DUPLICATE of bug 109054
Product: uml
Classification: Unclassified
Component: Code Generation
6.x
All All
: P1 (vote)
: TBD
Assigned To: issues@uml
issues@uml
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-10 01:53 UTC by Peter Lam
Modified: 2007-08-07 08:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lam 2007-07-10 01:53:50 UTC
1. Even though the "Add Merge Markers to Existing Source Elements" checkbox is unchecked, the markers are added to the
whole source. 
2. The original source file was also replaced by a totally newly generated source. 
3. After code generation, navigate to source opens the new source from #2 in a separate source editor side by side with
the original source.

Repro steps:
- create a uml java-platform project
- create a java project
- from the java project, create a new class and add a new attribute and a new operation to the class
- save and reverse engineer the class to the uml project created above
- create a class diagram in the uml project
- drag and drop the re'ed class to the class diagram
- add a new operation to the class from the class diagram
- generate code for the class with the default options ("Add Merge Markers to Existing Source Elements" should be
unchecked while "Generate Markers for Source File Merging" is checked)
- navigate to the source and note that markers are generated in the original source

Here's the original class in the java project:
/*
 * NewClass.java
 * 
 * Created on Jul 9, 2007, 5:29:57 PM
 * 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author peter
 */
public class NewClass {

    private int at1;
    
    public NewClass() {
    }
    public void oper1(int p1){
        at1 = p1;
    }

}


Here's the generated class after adding oper2():

/**
 *  @author peter
 */
// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.70D94DA7-CF2A-7884-CBB5-0769611D50FB]
// </editor-fold> 
public class NewClass {

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.C58CB62A-EE42-6404-6464-90FE1F39236F]
    // </editor-fold> 
    private int at1;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.526E7A08-9DBC-1988-4C57-98F38EA41A6D]
    // </editor-fold> 
    public NewClass () {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.F4B3E3E7-8C47-A030-7D3B-AD1B5DBF11FD]
    // </editor-fold> 
    public void oper1 (int p1) {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.FCF7C4F3-5520-9BFC-AE40-7B5E41EADBDD]
    // </editor-fold> 
    public void oper2 () {
    }

}
Comment 1 Viktor Lapitski 2007-07-10 02:00:58 UTC
unfortunately, it isn't implemented yet. The issue 109054 tracks the progress.

*** This issue has been marked as a duplicate of 109054 ***
Comment 2 Peter Lam 2007-08-07 08:31:02 UTC
verified in build 20070807-b2306.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo