RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Fri Jan 09, 2009 8:06 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Wed May 10, 2006 5:07 pm 
Offline
RomRaider Developer
User avatar

Joined: Thu Mar 23, 2006 5:21 am
Posts: 454
Location: San Diego, CA
I used to use CVS a lot, but now I mainly use Subversion.

I haven't hosted anything on sourceforge myself, so don't know what it takes to set a project up and get things going, but I sould be able to figure it out pretty quickly.

For now it may be easier for me to just send over diffs and/or the changed files.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 10, 2006 5:54 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 1770
Location: Palo, IA
My webhost has subversion. At one point I had it installed (I might still..) but I couldn't figure it out. I'll take another shot at it. The good thing about CVS though is that you can check files in and out from in NetBeans.

_________________
jared.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Wed May 10, 2006 6:48 pm 
Offline
RomRaider Developer
User avatar

Joined: Thu Mar 23, 2006 5:21 am
Posts: 454
Location: San Diego, CA
CVS and subversion are almost the same from the users point of view, but subversion has a few more features.

Either way, I'll post up some diffs/patches and the changed files later tonight when I get home.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 10, 2006 6:58 pm 
Offline
Administrator

Joined: Mon Feb 13, 2006 6:27 pm
Posts: 223
If you need help, just shoot me an email.

I administer ClearCase all day, so I'm sure I could help with SubVersion. I've been meaning to check it out anyways. I used CVS many moons ago, but never the web interface.

Mike


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 10, 2006 7:51 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 1770
Location: Palo, IA
crazymikie wrote:
If you need help, just shoot me an email.

I administer ClearCase all day, so I'm sure I could help with SubVersion. I've been meaning to check it out anyways. I used CVS many moons ago, but never the web interface.

So there is a web interface? That'd be great.. We use PVCS at work and I hate it.

_________________
jared.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Thu May 11, 2006 3:25 am 
Offline
RomRaider Developer
User avatar

Joined: Thu Mar 23, 2006 5:21 am
Posts: 454
Location: San Diego, CA
Just one file, ECUEditor.java needs to be updated to fix the memory leak. Here's the important part:
Code:
@@ -195,15 +198,20 @@
     
     public void closeImage() {
         for (int i = 0; i < imageRoot.getChildCount(); i++) {
-            if (((RomTreeNode)imageRoot.getChildAt(i)).getRom() == lastSelectedRom) {
-               
-                for (int j = 0; j < getImages().get(i).getTables().size(); j++) {
-                    rightPanel.remove(((Table)getImages().get(i).getTables().get(i)).getFrame());
-                }
-               
-                ((Rom)getImages().get(i)).closeImage();
-                imageRoot.remove((RomTreeNode)imageRoot.getChildAt(i));
-                getImages().remove(i);
+            RomTreeNode romTreeNode = (RomTreeNode)imageRoot.getChildAt(i);
+            Rom rom = romTreeNode.getRom();
+            if (rom == lastSelectedRom) {
+                Vector<Table> romTables = rom.getTables();
+                for (Iterator j = romTables.iterator(); j.hasNext();) {
+                    Table t = (Table)j.next();
+                    rightPanel.remove(t.getFrame());
+                }
+                rom.closeImage();
+                romTreeNode.setRom(null);
+                romTreeNode.removeAllChildren();
+                images.remove(i);
+                imageRoot.remove(romTreeNode);
+                break;
             }
         }
         imageList.updateUI();

The real key is romTreeNode.removeAllChildren(), the rest of it is just being thorough and making it a bit easier for me to follow.

Also there appeared to be a bug in the original line
Code:
rightPanel.remove(((Table)getImages().get(i).getTables().get(i)).getFrame());

The second i should probably be j, but in my version I replaced that loop with an Iterator.

Note the added break once the last selected ROM is found, no need to cycle through any more once the selected ROM is closed.

Also to note, there are a number of places in various source files where you call
Code:
new JOptionPane().showMessageDialog
Creating a new JOptionPane is not necessary since showMessageDialog is static. On a similar note, there are cases where you access a static variable in a non-static way (see JCheckBox.RIGHT).

Here's a diff for ECUEditor.java showing the change in this file, all the other references should be modified similarly. I've attached a zip file which has the modified source I ended up with. Have a look with WinMerge and let me know if you have any questions.
Code:
@@ -63,7 +67,7 @@
             Document doc = parser.getDocument();
             settings = domUms.unmarshallSettings(doc.getDocumentElement());
         } catch (Exception ex) {
-            new JOptionPane().showMessageDialog(this, "Settings file not found.\n" +
+            JOptionPane.showMessageDialog(this, "Settings file not found.\n" +
                     "A new file will be created.", "Error Loading Settings", JOptionPane.INFORMATION_MESSAGE);
         }
         
             infoPanel.add(new URL(getSettings().getRomRevisionURL()));
             
             JCheckBox check = new JCheckBox("Always display this message", true);
-            check.setHorizontalAlignment(check.RIGHT);
+            check.setHorizontalAlignment(JCheckBox.RIGHT);
             
             check.addActionListener(
                 new ActionListener() {
@@ -171,7 +174,7 @@
             );
             
             infoPanel.add(check);
-            new JOptionPane().showMessageDialog(this, infoPanel, "ECU Revision is Obsolete", JOptionPane.INFORMATION_MESSAGE);
+            JOptionPane.showMessageDialog(this, infoPanel, "ECU Revision is Obsolete", JOptionPane.INFORMATION_MESSAGE);
         }   
         input.setContainer(this);     
     }


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 11, 2006 3:33 am 
Offline
RomRaider Developer
User avatar

Joined: Thu Mar 23, 2006 5:21 am
Posts: 454
Location: San Diego, CA
qoncept wrote:
So there is a web interface? That'd be great.. We use PVCS at work and I hate it.
The only web inteface to subversion is the web interface for browsing the repository.

See the Azureus CVS page for details and an example: http://sourceforge.net/cvs/?group_id=84122

I'm not sure how SourceForge's subversion repo works, but I think it's the same or very similar as CVS. It seems easy enough to register a project with SourceForge http://sourceforge.net/register/ so I'd suggest that you register RomRaider there and then we can start playing with it. It will definitely make it easier for multiple developers to check in code if you give others access.

The first thing I would probably do is to check in various milestones (each beta version) into the repository and then tag them so that it's easy to do diffs between revisions and see how things have changed if you wanted to.


Last edited by drees on Mon May 15, 2006 7:31 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon May 15, 2006 8:28 am 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 1770
Location: Palo, IA
Ok, I have Subversion installed again but I haven't had time to play with it and figure it out yet. All I know so far is I don't think I like the client all that much.

_________________
jared.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Mon May 15, 2006 7:32 pm 
Offline
RomRaider Developer
User avatar

Joined: Thu Mar 23, 2006 5:21 am
Posts: 454
Location: San Diego, CA
I posted about Subversion in another thread.

What do you think of the changes I made?


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 15, 2006 9:11 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 1770
Location: Palo, IA
I actually haven't had a chance to look yet. Should be able to get to it tomorrow though..

_________________
jared.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Mon May 15, 2006 9:48 pm 
Offline
RomRaider Developer
User avatar

Joined: Thu Mar 23, 2006 5:21 am
Posts: 454
Location: San Diego, CA
qoncept wrote:
I actually haven't had a chance to look yet. Should be able to get to it tomorrow though..
No hurry, was just curious. :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 16, 2006 9:12 am 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 1770
Location: Palo, IA
Just took a look, I like it. Looks like you were able to fix a lot of the old things I haven't even looked at in quite a while.. Great to get a fresh set of eyes :) Any idea what you want to work on next? ;)

_________________
jared.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Tue May 16, 2006 1:52 pm 
Offline
RomRaider Developer
User avatar

Joined: Thu Mar 23, 2006 5:21 am
Posts: 454
Location: San Diego, CA
I don't have a lot of free type, but if there's any little things that need to be done, let me know. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl
phpBB SEO