Home » Language IDEs » Java Development Tools (JDT) » Overriding preferences in Eclipse.
Overriding preferences in Eclipse. [message #42632] |
Thu, 29 May 2003 01:35  |
Eclipse User |
|
|
|
Originally posted by: delmyers.uvic.ca
Hi,
I'm new to this group. I'm hoping that someone can help me out.
I am part of a team that is experimenting with using Eclipse plugins to make
a simplified Java IDE for new programmers. We want to make explicit to them
the edit-save-compile-run process. So, we want to stop Eclipse from
automatically compiling files when they are saved. Is there any way to do
that programmatically? I.e. how can I override the default workbench
preferences to stop the auto-build?
There are, then, two related issues:
1) I know that there is a way to set the preferences so that the BuildAction
will automatically save on a build. How is it done though?
2) Is there any simple way to stop the Launcher from building files before a
run?
Thank you very much for your help.
Del.
|
|
| |
Re: Overriding preferences in Eclipse. -- Why? [message #42850 is a reply to message #42632] |
Thu, 29 May 2003 08:53   |
Eclipse User |
|
|
|
Why? Any reason why you feel making the edit/compile/run cycle more manual
is a "good thing" for new programmers?
When I was teaching Java (over about five years) I started teaching it using
basic editors and a command line, then migrated to Kawa (simple IDE with
explicit compiles), then to VisualAge for Java.
One of the things I saw was that moving to VAJ let the students concentrate
on the language more, rather than having to think about how to write a class
*and* where to put it *and* how to run the compiler.
Later in the course, we'd look at the directory layout and command-line
compiler, and it became much simpler for them to understand (as they already
had a basic understanding of the language -- now they could concentrate on
learning about the compilation process in detail.)
(I'd also teach them how to use features like code assist, which greatly
sped up their lab work...)
More importantly, with incremental compilation, it makes errors immediately
obvious. The problem with manual compilation is that quite often I see folks
write code for several hours (sometimes days) before they even try to
compile. Their mode is "get the code done, then try to compile it". By the
time they compile, the changes they made aren't fresh in their head, so when
they get several compiler error messages while building, they have to
mentally switch context back to each edit they made. Time consuming and
potentially more error prone. Not to mention the usual cascade of error
messages (one error causes 10 more, often in other files...)
With incremental compilation (and frequent saves -- something to encourage
regardless of incremental compilation, of course), the programmer's mindset
is still "right there" on the code they just typed. When they get the
compiler message, it's usually pretty obvious what they need to do to fix
it.
My point is that it's nice to "know" what's going on under the covers; just
don't force people to be dragged down by that knowledge. If you disable
great features like incremental compilation, they'll probably get used to
doing it manually and never realize the benefit that incremental compilation
brings.
(Historical note -- when I used to run AppleSoft Pascal, I got so incredibly
tired of typing QUR [Quit-Update-Run]. Just "R" would have been great...
However, with the amount of time the compiler took back in the early 80's,
incremental compile on save would have been a bad idea. Now the compilation
process is quite fast, so the benefits far outweigh the [short, if any]
wait...)
-- Scott
"Del" <delmyers@uvic.ca> wrote in message news:bb4666$cjg$1@rogue.oti.com...
> Hi,
>
> I'm new to this group. I'm hoping that someone can help me out.
>
> I am part of a team that is experimenting with using Eclipse plugins to
make
> a simplified Java IDE for new programmers. We want to make explicit to
them
> the edit-save-compile-run process. So, we want to stop Eclipse from
> automatically compiling files when they are saved. Is there any way to do
> that programmatically? I.e. how can I override the default workbench
> preferences to stop the auto-build?
>
> There are, then, two related issues:
> 1) I know that there is a way to set the preferences so that the
BuildAction
> will automatically save on a build. How is it done though?
> 2) Is there any simple way to stop the Launcher from building files before
a
> run?
>
> Thank you very much for your help.
>
> Del.
>
>
|
|
|
Re: Overriding preferences in Eclipse. [message #43895 is a reply to message #42821] |
Thu, 29 May 2003 20:37   |
Eclipse User |
|
|
|
Originally posted by: delmyers.uvic.ca
> Just curious, but what other functionality are you taking out of the JDT
in
> order to make it "simplified" for new programmers? If you want to disable
> incremental compilation, you can go to window->preferences->workbench and
> disable "Perform build automatically on resource modification."
>
I know that you can change the preferences, but the point is that we want
that to be done automatically. We don't want the students to have to fiddle
with the preferences to get eclipse started.
There are a number of other things that we are working on, but it is sort of
experimental, and everything is going to go through user-tests, so I can't
really say.
Del.
> Randy
>
>
> "Del" <delmyers@uvic.ca> wrote in message
news:bb4666$cjg$1@rogue.oti.com...
> > Hi,
> >
> > I'm new to this group. I'm hoping that someone can help me out.
> >
> > I am part of a team that is experimenting with using Eclipse plugins to
> make
> > a simplified Java IDE for new programmers. We want to make explicit to
> them
> > the edit-save-compile-run process. So, we want to stop Eclipse from
> > automatically compiling files when they are saved. Is there any way to
do
> > that programmatically? I.e. how can I override the default workbench
> > preferences to stop the auto-build?
> >
> > There are, then, two related issues:
> > 1) I know that there is a way to set the preferences so that the
> BuildAction
> > will automatically save on a build. How is it done though?
> > 2) Is there any simple way to stop the Launcher from building files
before
> a
> > run?
> >
> > Thank you very much for your help.
> >
> > Del.
> >
> >
>
>
|
|
| |
Re: Overriding preferences in Eclipse. -- Why? [message #43987 is a reply to message #43924] |
Thu, 29 May 2003 21:41   |
Eclipse User |
|
|
|
I get into discussions like this quite a bit, with folks making statements
like "it's better to learn the internals first", especially when related to
GUI building.
The trouble is, everyone who has made those statements is biased by the fact
that they happened to learn the internals first, then learned the builders.
I've got the same background -- I learned how to do it all by hand first.
However, I've taught Java from both directions to people who were "blank
slates", and I've honestly seen a significant difference in ease of learning
by hiding the details up front, then adding them once the students are
familiar with the language basics. (The first 1.5-2 years I taught
command-line first, then I switched to VAJ first.)
One of the most common errors you'll get once you turn off the auto
compilation is that people will forget to compile the changes they just made
(I know because it happenned all the time when I taught ;), which can
greatly frustrate the learning process.
(I remember making the same type of mistake when I was first learning to
program, and how much time I'd spend staring at code that I just changed and
for some reason the program wasn't doing what the code said... Most often
this was on machines that I didn't have "make" or an equivalent on, so you
had to compile pieces, which made it easy to miss a piece.)
Later,
-- Scott
"Del" <delmyers@uvic.ca> wrote in message news:bb69pb$stt$1@rogue.oti.com...
> > Why? Any reason why you feel making the edit/compile/run cycle more
manual
> > is a "good thing" for new programmers?
>
> Well, I think that we just don't want the whole coding process to seem
like
> "magic". We will be working with students who are at many different
levels,
> and there are some concepts that we want to reenforce--such as: the
computer
> doesn't actually just understand what you just wrote; it has to translate
it
> into a language that it knows (though this isn't "really" what Java does,
> but the abstract concept is the same). Also, we will want them to
understand
> what the compiler does and outputs.
>
> > My point is that it's nice to "know" what's going on under the covers;
> just
> > don't force people to be dragged down by that knowledge. If you disable
> > great features like incremental compilation, they'll probably get used
to
> > doing it manually and never realize the benefit that incremental
> compilation
> > brings.
>
> I certainly realize the benefit that incremental compilation brings, and I
> use it myself; it saves me a lot of time. However, I think it is more
> benificial that I actually learned what compilation was in the first
place.
> I am certainly not dragged down by that knowledge.
>
> But apart from what our actual task is at this point, just knowing how to
> override the Eclipse default settings would be a very useful thing to
know.
>
> Thanks.
>
>
>
|
|
|
Re: Overriding preferences in Eclipse. -- Why? [message #44172 is a reply to message #43987] |
Fri, 30 May 2003 03:04   |
Eclipse User |
|
|
|
Originally posted by: if.you.want.to.email.visit.my.site.joshbrain.tripod.com
"Scott Stanchfield" <scott@javadude.com> wrote in
news:bb6crj$um5$1@rogue.oti.com:
> I get into discussions like this quite a bit, with folks making
> statements like "it's better to learn the internals first", especially
> when related to GUI building.
....
Seems to me that compilers are fundamentally an implementation detail. The
point of programming is to tell the computer to do something and then see
what it does. Yes, it is important to know something about the build
process if you want to get real work done, but I agree with Scott that this
can safely wait until later. And there doesn't seem to be a compelling
reason to shut off incremental compile at any point during the learning
process.
And if you're still not convinced, then why stop there? I mean, that
bytecode has to be loaded and executed by the JVM, so why not have them
understand the class file format and how the JVM interprets it and converts
it into machine code? Then you could talk about CPU architecture and then
classical electromagnetism, and then maybe some solid state physics and
quantum physics. Sounds like a great beginning Java class to me! :-)
--
With kind regards,
Josh R.
|
|
| |
Re: Overriding preferences in Eclipse. -- Why? [message #45803 is a reply to message #44969] |
Sat, 31 May 2003 11:41   |
Eclipse User |
|
|
|
Well if I had to, I'd do the following, under protest, mind you... ;)
1) unzip the Eclipse distro you want to use
2) start Eclipse
3) change these options in the pref dialog
a) Workbench: uncheck Perform Build Automatically on resource
modification
b) Debug: uncheck Build (if required) before launching
(Still don't like it...)
4) exit Eclipse
5) re-zip your c:\eclipse dir
Now you cam simply give them the new eclipse zip that you've created and the
options will be set.
Hope this helps (though I still recommend against it...)
--Scott
PS: I don't recommend doing this ;)
"Del" <delmyers@cs.uvic.ca> wrote in message
news:bb80p9$2g5$1@rogue.oti.com...
>
> "Scott Stanchfield" <scott@javadude.com> wrote in message
> news:bb6crj$um5$1@rogue.oti.com...
> > I get into discussions like this quite a bit, with folks making
statements
> > like "it's better to learn the internals first", especially when related
> to
> > GUI building.
>
>
> It is a good and useful discussion, but unfortunately I'm not really the
> person to have it with. I'm not a professor myself, I am just helping to
> write some code for Eclipse. However, I'm sure that my supervisor will be
> interested in your comments, and I'll let her know.
>
> But, that doesn't solve my problem right now. Does anyone know how to
> override the default preferences in Eclipse programmatically? That is what
I
> need help with right now. Thank you.
>
> Del.
>
>
|
|
| | |
Re: Overriding preferences in Eclipse. [message #47309 is a reply to message #42632] |
Tue, 03 June 2003 09:18  |
Eclipse User |
|
|
|
There is a mechanism to override the default preference settings:
I never tried that but class 'Plugin' explains:
....file (value <code>"preferences.ini"</code>) in a plug-in's directory
that, when present, contains values that override the normal default
values for this plug-in's preferences.
<p>
The format of the file is as per <code>java.io.Properties</code> where
the keys are property names and values are strings.
@since 2.0
You can add a fragment to org.eclipse.ui containing this file. The
content would be something like 'AUTO_BUILD=false'
(constant values can be found in
org.eclipse.ui.internal.IPreferenceConstants or
PreferenceConstants.PreferenceConstants)
Martin
Del wrote:
> Hi,
>
> I'm new to this group. I'm hoping that someone can help me out.
>
> I am part of a team that is experimenting with using Eclipse plugins to make
> a simplified Java IDE for new programmers. We want to make explicit to them
> the edit-save-compile-run process. So, we want to stop Eclipse from
> automatically compiling files when they are saved. Is there any way to do
> that programmatically? I.e. how can I override the default workbench
> preferences to stop the auto-build?
>
> There are, then, two related issues:
> 1) I know that there is a way to set the preferences so that the BuildAction
> will automatically save on a build. How is it done though?
> 2) Is there any simple way to stop the Launcher from building files before a
> run?
>
> Thank you very much for your help.
>
> Del.
>
>
|
|
|
Goto Forum:
Current Time: Thu Jul 17 19:40:46 EDT 2025
Powered by FUDForum. Page generated in 0.08509 seconds
|