imagej / imagej-updater

The automatic updater for ImageJ
Other
12 stars 15 forks source link

UpToDate: improve detection of developer setting #39

Closed ctrueden closed 10 years ago

ctrueden commented 10 years ago

The previous detection was failing when launching net.imagej.Main from Eclipse—and probably in many other scenarios, too—due to the fact that we now use release couplings by default. So net.imagej.updater.UpToDate.class will be located in a JAR file, even when running from the IDE. But the imagej.dir property is normally not set in that scenario, since only the ImageJ Launcher sets it by default.

Of course, you could set imagej.dir in your Run configuration, which would defeat this heuristic. But this approach should work for most people most of the time...

ctrueden commented 10 years ago

@dscho Do you think this is the right thing to do? Or can you think of a better way?

dscho commented 10 years ago

Let's just remove the isDeveloper thing altogether. What it originally tried to do is to determine whether the current user is allowed to upload. We have much better (and way more fine-grained) ways to do that now.

dscho commented 10 years ago

Ah, I see... maybe we should rename this into isOutsideImageJ? But then scripts might fail that check for that value...

Okay, I'll punt for now and just merge your fix.