Go to Post You must wear safety glasses at all times, so please bring them. - Don Wright [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-02-2016, 20:14
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 519
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
RobotBuilder overwriting Java Commands

I updated the wpilib plugins, and the latest update seems to have introduced a major bug into RobotBuilder. If I modify the "extends Command" part of the class declaration for Commands, RobotBuilder overwrites the entire file. This bug is not triggered by adding comments to the beginning of the line, or by changing the visibility of the class. It only occurs when the base class is changed, or the class implements an interface.

I use a ParameterCommand base class for many of our commands, which allows me to set parameters from the SmartDashboard, so this bug is a very big problem for me. All the classes that extend ParameterCommand were overwritten the first time I regenerated the code after updating the Eclipse plugins.

There is also the possibility that this is not a new bug, because I may have not previously regenerated the code after adding the ParameterCommand
code.

Does anyone where I can get the earlier plugins, because the old versions are immediately removed from the update site when an update is released?

EDIT: This bug was not introduced in the latest update, it has been around for a while.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists

Last edited by Ben Wolsieffer : 13-02-2016 at 21:03.
Reply With Quote
  #2   Spotlight this post!  
Unread 18-02-2016, 22:17
tcjinaz tcjinaz is offline
Tim
FRC #3853
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2011
Location: Arizona
Posts: 205
tcjinaz has a spectacular aura abouttcjinaz has a spectacular aura about
Re: RobotBuilder overwriting Java Commands

Quote:
Originally Posted by lopsided98 View Post
I updated the wpilib plugins, and the latest update seems to have introduced a major bug into RobotBuilder. If I modify the "extends Command" part of the class declaration for Commands, RobotBuilder overwrites the entire file. This bug is not triggered by adding comments to the beginning of the line, or by changing the visibility of the class. It only occurs when the base class is changed, or the class implements an interface.

I use a ParameterCommand base class for many of our commands, which allows me to set parameters from the SmartDashboard, so this bug is a very big problem for me. All the classes that extend ParameterCommand were overwritten the first time I regenerated the code after updating the Eclipse plugins.

There is also the possibility that this is not a new bug, because I may have not previously regenerated the code after adding the ParameterCommand
code.

Does anyone where I can get the earlier plugins, because the old versions are immediately removed from the update site when an update is released?

EDIT: This bug was not introduced in the latest update, it has been around for a while.
Are you sure you are getting a proper save of the changes you made? We have found that if we do not force saves efore updating from RB, that we can lose changes we made in eclipse.

Tim
__________________
Software Mentor
3853 Pridetronics[

Reply With Quote
  #3   Spotlight this post!  
Unread 19-02-2016, 12:57
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP, WPILib. 2084 alum
AKA: Sam Carlberg
no team
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2009
Location: MA
Posts: 45
SamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to behold
Re: RobotBuilder overwriting Java Commands

This is intentional.

RobotBuilder sees that the type of the command is not what the program exported (i.e. you changed 'SomeCommand extends Command' to 'SomeCommand extends ParameterCommand') and overwrites it. If you're using custom command types, you should make a custom RobotBuilder extension for them instead of changing the type after the fact.
__________________
WPILib
GRIP, RobotBuilder
Reply With Quote
  #4   Spotlight this post!  
Unread 22-02-2016, 00:07
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,544
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: RobotBuilder overwriting Java Commands

We ran into this today also. We just added an implements to a subsystem (keeping the same extends) and the subsystem was overwritten.

Sam, can you do an extension for a Command or Subsystem? When I was looking through the code, it didn't seem like you could.
Reply With Quote
  #5   Spotlight this post!  
Unread 22-02-2016, 20:27
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP, WPILib. 2084 alum
AKA: Sam Carlberg
no team
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2009
Location: MA
Posts: 45
SamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to behold
Re: RobotBuilder overwriting Java Commands

Quote:
Originally Posted by Joe Ross View Post
We ran into this today also. We just added an implements to a subsystem (keeping the same extends) and the subsystem was overwritten.
Ah. Time to change a regex (or three)

Quote:
Originally Posted by Joe Ross View Post
Sam, can you do an extension for a Command or Subsystem? When I was looking through the code, it didn't seem like you could.
You can make a custom component for any section. Check the documentation on extensions for details
__________________
WPILib
GRIP, RobotBuilder

Last edited by SamCarlberg : 22-02-2016 at 20:31.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:16.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi