abstratt / eclipsegraphviz

EclipseGraphviz makes it easier to integrate Graphviz into Eclipse applications.
Eclipse Public License 1.0
23 stars 13 forks source link

Graphviz location isn’t remembered #3

Closed simonjwright closed 8 years ago

simonjwright commented 8 years ago

I have dot at /usr/local/bin/dot. I have to set this in Preferences/Graphviz every time I start Eclipse.

EclipseGraphviz 2.1.201501.201512111327

Message: dot.exe/dot not found in PATH. Please install it from graphviz.org, update the PATH or specify the absolute path in the preferences.

Session Data: eclipse.buildId=4.5.1.M20150904-0015 java.version=1.8.0_66 java.vendor=Oracle Corporation BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US Framework arguments: -product org.eclipse.epp.package.modeling.product -keyring /Users/simon/.eclipse_keyring -showlocation Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.modeling.product -keyring /Users/simon/.eclipse_keyring -showlocation

abstratt commented 8 years ago

@simonjwright This is a weird one. I could not reproduce it locally, but I am on Linux, not a Mac.

Simon, do other preferences stick? For instance, if you set "-v" (no quotes, lowercase) under "Additional command-line options":

image

does it too get lost?

abstratt commented 8 years ago

Also, could you later try this?

  1. Window > Show View > Error Log
  2. Delete Log (red X) - log will become empty
  3. Configure the custom location for dot in the Preferences for EclipseGraphviz
  4. Make EclipseGraphviz render a diagram
  5. Exit Eclipse
  6. Start Eclipse again
  7. Without opening the preferences first, make EclipseGraphviz render a diagram (it won't work, right?)
  8. Window > Show View > Error Log
  9. Is it empty? If not, please hit Export Log (1st icon to the left) and attach the exported log file here

(btw, I am starting to think this and your other bug report - abstratt/textuml#94 are related, and all I did there was to workaround the issue with loading preferences).

simonjwright commented 8 years ago

I tried adding -v, no change (and it didn’t get added).

Attaching the error log - graphviz-problem.txt

Also, com.abstratt.graphviz.prefs contains

commandLineExtension=
dotManualPath=
dotSearchMethod=AUTO
eclipse.preferences.version=1
simonjwright commented 8 years ago

I thought to edit com.abstratt.graphviz.prefs; it got overwritten the next time I started Eclipse.

abstratt commented 8 years ago

it got overwritten the next time I started Eclipse.

Ouch.

I still cannot reproduce it here, even if I remove Graphviz from my machine.

I blindly made some changes to simplify the preferences code that may or may not make the issue go away. At least the code around preferences is a bit simpler/more streamlined now.

abstratt commented 8 years ago

@simonjwright Can you please try again once the TextUML Toolkit build 423 completes?

simonjwright commented 8 years ago

No change with new build, sorry.

com.abstratt.graphviz.prefs does get saved on exit.

I did some googling, it appears that in OS X Yosemite the only PATH a GUI application gets is /usr/bin:/bin - with no way of adjusting it. I don’t really want to put dot in a system location. Perhaps Apple will fix this bug sometime soon.

I tried making the .settings directory unwritable, hoping this might give a clue as to what was doing the overwriting; see unwritable-prefs.txt (rather long, I guess it’s the org.eclipse.oomph.setup.core entry)

abstratt commented 8 years ago

Good find, @simonjwright. Any chance you could try without Oomph, either by uninstalling it or downloading another copy of Eclipse without the Eclipse Installer, for instance, the Platform Runtime?

(you won't get the Marketplace client either, I believe, so you may have to install via Help > Install new Software...)

abstratt commented 8 years ago

@simonjwright Actually, before doing something as extreme as that, take a look at this StackOverflow thread.

Does the problem go away if you:

1) configure EclipseGraphviz as you want 2) configure Oomph to skip automatic task execution at startup time (i.e. the checkbox must be checked) 3) restart?

abstratt commented 8 years ago

@simonjwright See also: https://www.eclipse.org/forums/index.php/t/1067556/

abstratt commented 8 years ago

Seems related: eclipse-color-theme/eclipse-color-theme#223.

simonjwright commented 8 years ago

Fixed! by configuring as attached .. so I think that makes it an oomph problem rather than a graphviz one?

Those settings were the default: I just had to check the Record into: checkbox. For some reason, none of your preferences appear if I choose to record into the workspace or the installation.

Thanks for the help.

preference-recorder

abstratt commented 8 years ago

I think so, Simon.

Preferences in Eclipse may have different scopes (project, workspace/instance, installation/configuration). EclipseGraphviz only has instance-scoped preferences (/instance/...). However, I'd expect Oomph to list them both when you chose User and Workspace. May or may not be related.

Thanks for your patience in isolating this. Do you use the Eclipse Bugzilla? It would be great if you could report the issue against Oomph.

simonjwright commented 8 years ago

Reported.