Freeplane-gradle: eclipse settings

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Freeplane-gradle: eclipse settings

Felix Natter
Administrator
hi,

please don't tl;dr this, it was a lot of work ;-)

there was a remaining issue when starting from eclipse:
STDERR: Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils cannot be found by org.freeplane.plugin.script_1.4.1
STDERR: at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:382)

(even though we successfully export-package: this in :freeplane and
import-package: it in :freeplane_plugin_script...)

=> this was fixed by Blair in requiring the commons-{lang,io} bundles
from eclipse in the OSGi launch config. It's not perfect, but I think
It's ok.

(yay, (highfive) Blair, Dimitry, we made some big progress!)

Now we are devoting our time to several things that are left to do:
- bin/src/srcpure dists (need to convert line endings in src/srcpure)
- windows/portable dists (I think BUILD/freeplane.{sh,bat} works) [need help from Dimitry]
- mac build/dist [need help from Dimitry]
- (compile) problems on rebuild+reimport [not reprocible, needs testing]
- copy settings to <project>/.settings [need to talk to Dimitry about the right templates for each project]
- latex syntax highlighting does not work yet (eclipse only)
- where to put the eclipse stuff (launcher, settings)? currently in freeplane_devresources
  -> freeplane/eclipse | freeplane_framework/eclise?
- adapt .gitignore
- Intellij IDEA support [Blair is so kind to look at this]

== <project>/.settings ==

One important item is to automatically copy the eclipse settings in
<project>/.settings. However, there is a mess of different .settings in
freeplane-ant:

:freeplane contains:
org.eclipse.core.resources.prefs org.eclipse.jdt.core.prefs
org.eclipse.ltk.core.refactoring.prefs org.eclipse.wst.validation.prefs
org.eclipse.core.runtime.prefs org.eclipse.jdt.ui.prefs
org.eclipse.pde.core.prefs

:freeplane_plugin_* contains:
org.eclipse.core.resources.prefs  org.eclipse.core.runtime.prefs
org.eclipse.jdt.core.prefs  org.eclipse.pde.core.prefs

:freeplane_ant contains:
org.eclipse.core.resources.prefs

:JOrtho_0.4_freeplane contains:
org.eclipse.core.resources.prefs org.eclipse.core.runtime.prefs
org.eclipse.jdt.core.prefs

:freeplane_framework contains:
org.eclipse.core.resources.prefs org.eclipse.core.runtime.prefs
org.eclipse.jdt.core.prefs

=> none of these settings overrides the indentation which is still 1 tab
(eclipse default), so I won't change this.

== Concerning the contents of *.prefs ==

org.eclipse.core.resources.prefs:
  eclipse.preferences.version=1
  encoding/<project>=UTF-8 // is the wildcard "<project>" correct?
  encoding/doc=ISO-8859-1
// --> the last line is only present in :freeplane
// --> we need two templates here (one for :freeplane, one for the rest)?
// --> I think we want two templates for all of *.prefs!

org.eclipse.jdt.core.prefs:
  eclipse.preferences.version=1
  org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
  org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
  org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
  org.eclipse.jdt.core.compiler.compliance=1.5
  org.eclipse.jdt.core.compiler.debug.lineNumber=generate
  org.eclipse.jdt.core.compiler.debug.localVariable=generate
  org.eclipse.jdt.core.compiler.debug.sourceFile=generate
  org.eclipse.jdt.core.compiler.doc.comment.support=enabled
  org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
  org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
  org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
  org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
  org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
  org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
  org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
  org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
  org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
  org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
  org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
  org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
  org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
  org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
  org.eclipse.jdt.core.compiler.source=1.5
[in a freeplane_plugin_* project, this looks like]
  eclipse.preferences.version=1
  org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
  org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
  org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
  org.eclipse.jdt.core.compiler.compliance=1.6
  org.eclipse.jdt.core.compiler.debug.lineNumber=generate
  org.eclipse.jdt.core.compiler.debug.localVariable=generate
  org.eclipse.jdt.core.compiler.debug.sourceFile=generate
  org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
  org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
  org.eclipse.jdt.core.compiler.source=1.6
(some projects are still on java5, I will change this to java6)

org.eclipse.ltk.core.refactoring.prefs (:freeplane only!):
  eclipse.preferences.version=1
  org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false

org.eclipse.wst.validation.prefs (:freeplane only!):
  DELEGATES_PREFERENCE=delegateValidatorList
  USER_BUILD_PREFERENCE=enabledBuildValidatorList
  USER_MANUAL_PREFERENCE=enabledManualValidatorList
  USER_PREFERENCE=overrideGlobalPreferencesfalse
  eclipse.preferences.version=1
  override=false
  suspend=false
  vf.version=3
--> "web standard tools" --> I will discard this

org.eclipse.core.runtime.prefs:
  eclipse.preferences.version=1
  line.separator=\n
--> seems to be important --> keep it!

org.eclipse.jdt.ui.prefs (:freeplane only!):
  cleanup_settings_version=2
  eclipse.preferences.version=1
  formatter_settings_version=11
  org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
--> discard this, or is this referencing freeplane_devresources/CodeStyle/*.xml?

org.eclipse.pde.core.prefs: (most probably important!!):
  eclipse.preferences.version=1
  pluginProject.equinox=false
  pluginProject.extensions=false
[freeplane_plugin_* also has this line]:
  resolve.requirebundle=false

In JOrtho_0.4_freeplane/.settings, things look like in the plugins,
but naturally, org.eclipse.pde.core.prefs is missing.
I think we can still use the same settings-templates for JOrtho
and ignore that superfluous pde.core.prefs file.

Concerning freeplane_framework:

org.eclipse.core.resources.prefs: // adds these lines:
  encoding/windows-installer=Cp1252
  encoding/windows-portable=Cp1252
org.eclipse.jdt.core.prefs: // adds this line
  org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate

I hope i did not forget anything. Given the heterogenous structure, I
think we should think about:

1. cleaning up the *.prefs files
2. keeping them in git for all projects except :freeplane_plugin_*
3. copying the :freeplane_plugin_* settings from somewhere (see below)
   to freeplane_plugin_*/.settings/ at "gradle eclipse" time

== Structure ==

I would like to move the settings-templates and launchers from
freeplane_devresources to freeplane/eclipse/. What is left in
freeplane_devresources is this:

freeplane_devresources/CodeStyle
freeplane_devresources/CodeStyle/formatter.xml
freeplane_devresources/CodeStyle/codetemplates.xml
freeplane_devresources/CodeStyle/clean-up.xml

=> @Dimitry: these files don't seem to be referenced anywhere?

freeplane_devresources/test
freeplane_devresources/test/ListsTest.mm
freeplane_devresources/test/StructuredMapTest.mm
freeplane_devresources/test/RichtextTests.mm
freeplane_devresources/test/generateTestMap.pl

=> we definitely want to keep this. do we need to keep the
freeplane_devresources project or can we move it to
freeplane_framework/test_data (or freeplane/test_data)?

Cheers and Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane-gradle: eclipse settings

Dimitry Polivaev
Administrator
Hi,

> hi,
>
> please don't tl;dr this, it was a lot of work ;-)
>
> there was a remaining issue when starting from eclipse:
> STDERR: Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils cannot be found
> by org.freeplane.plugin.script_1.4.1
> STDERR: at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:382)
>
> (even though we successfully export-package: this in :freeplane and
> import-package: it in :freeplane_plugin_script...)
>
> => this was fixed by Blair in requiring the commons-{lang,io} bundles
> from eclipse in the OSGi launch config. It's not perfect, but I think
> It's ok.

It's ok as a temporary solution. I'll look at it and try to fix it later.

>
> == <project>/.settings ==

I am not sure whether we need the most of this stuff.
I suppose that we need the same content for all projects containing org.eclipse.jdt.core.prefs and

org.eclipse.core.resources.prefs: encoding/<project>=UTF-8

I am not sure about the rest.

> One important item is to automatically copy the eclipse settings in
> <project>/.settings. However, there is a mess of different .settings in
> freeplane-ant:

why in freeplane-ant ???

> == Structure ==
>
> I would like to move the settings-templates and launchers from
> freeplane_devresources to freeplane/eclipse/. What is left in
> freeplane_devresources is this:
>
> freeplane_devresources/CodeStyle
> freeplane_devresources/CodeStyle/formatter.xml
> freeplane_devresources/CodeStyle/codetemplates.xml
> freeplane_devresources/CodeStyle/clean-up.xml
>
> => @Dimitry: these files don't seem to be referenced anywhere?

This are configurations which can be imported into eclipse workspace.
Actually I regularly forget to apply them myself.

>
> freeplane_devresources/test
> freeplane_devresources/test/ListsTest.mm
> freeplane_devresources/test/StructuredMapTest.mm
> freeplane_devresources/test/RichtextTests.mm
> freeplane_devresources/test/generateTestMap.pl
>
> => we definitely want to keep this. do we need to keep the
> freeplane_devresources project or can we move it to
> freeplane_framework/test_data (or freeplane/test_data)?

freeplane_devresources/test/generateTestMap.pl is useful for generation of large test maps for
profiling. I am not aware about the rest.

Regards,
Dimitry

Reply | Threaded
Open this post in threaded view
|

Re: Freeplane-gradle: eclipse settings

Volker Börchers
Administrator
In reply to this post by Felix Natter
Hi,

Am 24.01.2015 um 17:36 schrieb Felix Natter [via Freeplane Developer]:
> please don't tl;dr this, it was a lot of work ;-)

appreciated!

> there was a remaining issue when starting from eclipse:
> STDERR: Caused by: java.lang.ClassNotFoundException:
> org.apache.commons.io.FileUtils cannot be found by
> org.freeplane.plugin.script_1.4.1
> STDERR: at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:382)
>
>
> (even though we successfully export-package: this in :freeplane and
> import-package: it in :freeplane_plugin_script...)
>
> => this was fixed by Blair in requiring the commons-{lang,io} bundles
> from eclipse in the OSGi launch config. It's not perfect, but I think
> It's ok.

Are these libraries also usable from scripts, e.g. does this formula work?

   =org.apache.commons.io.FileUtils.ONE_KB

There is a wiki page that promises some libraries to be available to
scripts:

http://freeplane.sourceforge.net/wiki/index.php/Scripting:_Included_libraries

> == <project>/.settings ==
>
> One important item is to automatically copy the eclipse settings in
> <project>/.settings. However, there is a mess of different .settings in
> freeplane-ant:
>
> :freeplane contains:
> org.eclipse.core.resources.prefs org.eclipse.jdt.core.prefs
> org.eclipse.ltk.core.refactoring.prefs org.eclipse.wst.validation.prefs
> org.eclipse.core.runtime.prefs org.eclipse.jdt.ui.prefs
> org.eclipse.pde.core.prefs
>
> :freeplane_plugin_* contains:
> org.eclipse.core.resources.prefs  org.eclipse.core.runtime.prefs
> org.eclipse.jdt.core.prefs  org.eclipse.pde.core.prefs
>
> :freeplane_ant contains:
> org.eclipse.core.resources.prefs
>
> :JOrtho_0.4_freeplane contains:
> org.eclipse.core.resources.prefs org.eclipse.core.runtime.prefs
> org.eclipse.jdt.core.prefs
>
> :freeplane_framework contains:
> org.eclipse.core.resources.prefs org.eclipse.core.runtime.prefs
> org.eclipse.jdt.core.prefs
>
> => none of these settings overrides the indentation which is still 1 tab
> (eclipse default), so I won't change this.

Most projects I know do not store .settings but let Eclipse generate
them on project import. Are you sure that the .settings are of any use?

Isn't it enough to import the preferences under
freeplane_devresources/CodeStyle?

> == Concerning the contents of *.prefs ==
[...]
>
> I hope i did not forget anything. Given the heterogenous structure, I
> think we should think about:
>
> 1. cleaning up the *.prefs files

yes, and all other .settings files unless they are absolutely necessary.

> 2. keeping them in git for all projects except :freeplane_plugin_*
> 3. copying the :freeplane_plugin_* settings from somewhere (see below)
>     to freeplane_plugin_*/.settings/ at "gradle eclipse" time
>
> == Structure ==
>
> I would like to move the settings-templates and launchers from
> freeplane_devresources to freeplane/eclipse/. What is left in
> freeplane_devresources is this:
>
> freeplane_devresources/CodeStyle
> freeplane_devresources/CodeStyle/formatter.xml
> freeplane_devresources/CodeStyle/codetemplates.xml
> freeplane_devresources/CodeStyle/clean-up.xml
>
> => @Dimitry: these files don't seem to be referenced anywhere?

These files used to be part of the "setup the development environment"
instructions but I can't find them in
http://freeplane.sourceforge.net/wiki/index.php/Setup_Eclipse_for_coding

Perhaps one reason of the inconsistent code style in Freeplane... ugly

> freeplane_devresources/test
> freeplane_devresources/test/ListsTest.mm
> freeplane_devresources/test/StructuredMapTest.mm
> freeplane_devresources/test/RichtextTests.mm
> freeplane_devresources/test/generateTestMap.pl
>
> => we definitely want to keep this. do we need to keep the
> freeplane_devresources project or can we move it to
> freeplane_framework/test_data (or freeplane/test_data)?

whatever you like best

Regards,
Volker
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane-gradle: eclipse settings

Felix Natter
Administrator
In reply to this post by Dimitry Polivaev
"Dimitry Polivaev [via Freeplane Developer]"
<[hidden email]> writes:

> Hi,

hello Dimitry,

>> hi,
>>
>> please don't tl;dr this, it was a lot of work ;-)
>>
>> there was a remaining issue when starting from eclipse:
>> STDERR: Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils cannot be found
>> by org.freeplane.plugin.script_1.4.1
>> STDERR: at
>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:382)
>>
>> (even though we successfully export-package: this in :freeplane and
>> import-package: it in :freeplane_plugin_script...)
>>
>> => this was fixed by Blair in requiring the commons-{lang,io} bundles
>> from eclipse in the OSGi launch config. It's not perfect, but I think
>> It's ok.
>
> It's ok as a temporary solution. I'll look at it and try to fix it later.

Ok, thanks.

You need to copy the old freeplane-osgi.launch to
<workspace>/.metadata/.plugins/org.eclipse.debug.core/.launches/ (and
restart eclipse), as freeplane_devresources is currently not available
as a project in eclipse (see below).

Tell me if you need any help getting this to work.

>> == <project>/.settings ==
>
> I am not sure whether we need the most of this stuff.
> I suppose that we need the same content for all projects containing org.eclipse.jdt.core.prefs and
>
> org.eclipse.core.resources.prefs: encoding/<project>=UTF-8

org.eclipse.jdt.core.prefs,
org.eclipse.core.resources.prefs
=> that would be more or less all projects.

> I am not sure about the rest.

What about this?

org.eclipse.core.runtime.prefs:
  eclipse.preferences.version=1
  line.separator=\n

(this is consistent across almost all projects, so we should condider
using it)

and this?

org.eclipse.pde.core.prefs: (most probably important!!):
  eclipse.preferences.version=1
  pluginProject.equinox=false
  pluginProject.extensions=false
[freeplane_plugin_* also has this line]:
  resolve.requirebundle=false

=> how about adding this to all projects?
(I think projects without the PluginNature will ignore this!)
I think it's important to version-control the PDE prefs settings.
(those settings _may_ be necessary for the current state of
'Gradle_builds'...)

=> so do you agree to put the templates in
freeplane/eclipse/settings-templates/ or
freeplane_framework/eclipse/settings-templates/ and copying them to
<project>/.settings for all projects.

(of course this means that we use the same settings in all projects,
 but from what I read from Volker and you this sounds feasible)

>> One important item is to automatically copy the eclipse settings in
>> <project>/.settings. However, there is a mess of different .settings in
>> freeplane-ant:

> why in freeplane-ant ???

I meant to say "in freeplane with the ant build system".

>> == Structure ==

Put the launchers in freeplane/eclipse/ or freeplane_framework/eclipse/?

>> I would like to move the settings-templates and launchers from
>> freeplane_devresources to freeplane/eclipse/. What is left in
>> freeplane_devresources is this:
>>
>> freeplane_devresources/CodeStyle
>> freeplane_devresources/CodeStyle/formatter.xml
>> freeplane_devresources/CodeStyle/codetemplates.xml
>> freeplane_devresources/CodeStyle/clean-up.xml
>>
>> => @Dimitry: these files don't seem to be referenced anywhere?
>
> This are configurations which can be imported into eclipse workspace.
> Actually I regularly forget to apply them myself.

OK. Move this to freeplane/CodeStyle/ or freeplane_framework/CodeStyle/?

>> freeplane_devresources/test
>> freeplane_devresources/test/ListsTest.mm
>> freeplane_devresources/test/StructuredMapTest.mm
>> freeplane_devresources/test/RichtextTests.mm
>> freeplane_devresources/test/generateTestMap.pl
>>
>> => we definitely want to keep this. do we need to keep the
>> freeplane_devresources project or can we move it to
>> freeplane_framework/test_data (or freeplane/test_data)?
>
> freeplane_devresources/test/generateTestMap.pl is useful for generation of large test maps for
> profiling.

> I am not aware about the rest.

commit ce66eb5d41e216dd84013dfec98bb9fedab41ebb
Merge: dcd2a3e 30ef98e
Author: Hartmut Goebel <[hidden email]>
Date:   Fri May 31 14:12:01 2013 +0200

    Merge branch 'odf-stylesheet'.

commit dcaa1407e6e47d8ea4bc3178512ade50e674222e
Author: Hartmut Goebel <[hidden email]>
Date:   Fri May 31 00:13:20 2013 +0200

    Adding the maps I used for testing.

=> we should keep this.
=> freeplane/test_data or freeplane_framework/test_data?

Cheers and Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane-gradle: eclipse settings

Felix Natter
Administrator
In reply to this post by Volker Börchers
"Volker Börchers [via Freeplane Developer]"
<[hidden email]> writes:

hi Volker,

> Are these libraries also usable from scripts, e.g. does this formula work?
>
>    =org.apache.commons.io.FileUtils.ONE_KB

This still works.

> There is a wiki page that promises some libraries to be available to
> scripts:
>
> http://freeplane.sourceforge.net/wiki/index.php/Scripting:_Included_libraries

The problem with things like jlatexmath is that we currentliy only use
them in the respective plugins (and do not Export-Package: them).
--> they are probably not available for scripting.

>> == <project>/.settings ==
>>
>> One important item is to automatically copy the eclipse settings in
>> <project>/.settings. However, there is a mess of different .settings in
>> freeplane-ant:
>>
>> :freeplane contains:
>> org.eclipse.core.resources.prefs org.eclipse.jdt.core.prefs
>> org.eclipse.ltk.core.refactoring.prefs org.eclipse.wst.validation.prefs
>> org.eclipse.core.runtime.prefs org.eclipse.jdt.ui.prefs
>> org.eclipse.pde.core.prefs
>>
>> :freeplane_plugin_* contains:
>> org.eclipse.core.resources.prefs  org.eclipse.core.runtime.prefs
>> org.eclipse.jdt.core.prefs  org.eclipse.pde.core.prefs
>>
>> :freeplane_ant contains:
>> org.eclipse.core.resources.prefs
>>
>> :JOrtho_0.4_freeplane contains:
>> org.eclipse.core.resources.prefs org.eclipse.core.runtime.prefs
>> org.eclipse.jdt.core.prefs
>>
>> :freeplane_framework contains:
>> org.eclipse.core.resources.prefs org.eclipse.core.runtime.prefs
>> org.eclipse.jdt.core.prefs
>>
>> => none of these settings overrides the indentation which is still 1 tab
>> (eclipse default), so I won't change this.
>
> Most projects I know do not store .settings but let Eclipse generate
> them on project import. Are you sure that the .settings are of any use?

I think it is common practice with gradle to to store the (possibly sets
of) settings somewhere in version control, and copy these settings at
"gradle eclipse" time to all/the respective projects.

> Isn't it enough to import the preferences under
> freeplane_devresources/CodeStyle?

Not sure.

>> == Concerning the contents of *.prefs ==
> [...]
>>
>> I hope i did not forget anything. Given the heterogenous structure, I
>> think we should think about:
>>
>> 1. cleaning up the *.prefs files
>
> yes, and all other .settings files unless they are absolutely necessary.
>
>> 2. keeping them in git for all projects except :freeplane_plugin_*
>> 3. copying the :freeplane_plugin_* settings from somewhere (see below)
>>     to freeplane_plugin_*/.settings/ at "gradle eclipse" time
>>
>> == Structure ==
>>
>> I would like to move the settings-templates and launchers from
>> freeplane_devresources to freeplane/eclipse/. What is left in
>> freeplane_devresources is this:
>>
>> freeplane_devresources/CodeStyle
>> freeplane_devresources/CodeStyle/formatter.xml
>> freeplane_devresources/CodeStyle/codetemplates.xml
>> freeplane_devresources/CodeStyle/clean-up.xml
>>
>> => @Dimitry: these files don't seem to be referenced anywhere?
>
> These files used to be part of the "setup the development environment"
> instructions but I can't find them in
> http://freeplane.sourceforge.net/wiki/index.php/Setup_Eclipse_for_coding
>
> Perhaps one reason of the inconsistent code style in Freeplane... ugly
>
>> freeplane_devresources/test
>> freeplane_devresources/test/ListsTest.mm
>> freeplane_devresources/test/StructuredMapTest.mm
>> freeplane_devresources/test/RichtextTests.mm
>> freeplane_devresources/test/generateTestMap.pl
>>
>> => we definitely want to keep this. do we need to keep the
>> freeplane_devresources project or can we move it to
>> freeplane_framework/test_data (or freeplane/test_data)?
>
> whatever you like best

I think freeplane_framework is better because it already contains "meta
data" for installers etc.

Cheers and Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane-gradle: eclipse settings

Volker Börchers
Administrator
Hi Felix,

Am 25.01.2015 um 11:00 schrieb Felix Natter [via Freeplane Developer]:
> "Volker Börchers [via Freeplane Developer]"
>  > Are these libraries also usable from scripts, e.g. does this formula
> work?
>  >
>  >    =org.apache.commons.io.FileUtils.ONE_KB
>
> This still works.

Great.

>  > There is a wiki page that promises some libraries to be available to
>  > scripts:
>  >
>  >
> http://freeplane.sourceforge.net/wiki/index.php/Scripting:_Included_libraries
>
> The problem with things like jlatexmath is that we currentliy only use
> them in the respective plugins (and do not Export-Package: them).
> --> they are probably not available for scripting.

It would be a good result if this would be the only "lost library".

>  > Most projects I know do not store .settings but let Eclipse generate
>  > them on project import. Are you sure that the .settings are of any use?
>
> I think it is common practice with gradle to to store the (possibly sets
> of) settings somewhere in version control, and copy these settings at
> "gradle eclipse" time to all/the respective projects.

Ok, but my suggestion is to keep only these eclipse settings which are
strictly required (none, I suppose) and add more only if problems arise.

>  > Isn't it enough to import the preferences under
>  > freeplane_devresources/CodeStyle?
>
> Not sure.

Let's try

Best regards,
Volker
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane-gradle: eclipse settings

Dimitry Polivaev
Administrator
In reply to this post by Felix Natter
On 24.01.2015 17:36, Felix Natter [via Freeplane Developer] wrote:

> hi,
>
> please don't tl;dr this, it was a lot of work ;-)
>
> there was a remaining issue when starting from eclipse:
> STDERR: Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils cannot be found
> by org.freeplane.plugin.script_1.4.1
> STDERR: at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:382)
>
> (even though we successfully export-package: this in :freeplane and
> import-package: it in :freeplane_plugin_script...)
>
> => this was fixed by Blair in requiring the commons-{lang,io} bundles
> from eclipse in the OSGi launch config. It's not perfect, but I think
> It's ok.


I can not see any problem. Where exactly is the workaround implemented?

Dimitry
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane-gradle: eclipse settings

Felix Natter
Administrator
"Dimitry Polivaev [via Freeplane Developer]"
<[hidden email]> writes:

> On 24.01.2015 17:36, Felix Natter [via Freeplane Developer] wrote:
>
>> hi,

hello Dimitry,

>> please don't tl;dr this, it was a lot of work ;-)
>>
>> there was a remaining issue when starting from eclipse:
>> STDERR: Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils cannot be
> found
>> by org.freeplane.plugin.script_1.4.1
>> STDERR: at
>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:382)
>>
>> (even though we successfully export-package: this in :freeplane and
>> import-package: it in :freeplane_plugin_script...)
>>
>> => this was fixed by Blair in requiring the commons-{lang,io} bundles
>> from eclipse in the OSGi launch config. It's not perfect, but I think
>> It's ok.
>
> I can not see any problem. Where exactly is the workaround implemented?

Here is what I did:
- mkdir workspaces/freeplane_gradle
- cd workspaces/freeplane_gradle
- git clone https://github.com/freeplane/freeplane.git
- cd freeplane
- git checkout Gradle_builds
- gradle clean build cleanEclipse eclipse
- start eclipse on workspaces/freeplane_gradle
  - File->Import->Existing projects into workspace
    (root = .../workspaces/freeplane_gradle/freeplane)
  - select all, hit finish
  - copy freeplane-osgi.launch to
    <workspace>/.metadata/.plugins/org.eclipse.debug.core/.launches/
    and restart eclipse
  - run freeplane-osgi.launch

=> I get this:
>> STDERR: Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils cannot be
> found
>> by org.freeplane.plugin.script_1.4.1
and plugins don't work.

The workaround is to select the commons-lang and commons-io bundles in
the "Target" part of the freeplane-osgi.launch config, which
is NOT implemented on Gradle_builds.

I'll try to reproduce it locally later today or tomorrow.

Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane-gradle: eclipse settings

Felix Natter
Administrator
In reply to this post by Volker Börchers
"Volker Börchers [via Freeplane Developer]"
<[hidden email]> writes:

> Hi Felix,

hello Volker,

> Am 25.01.2015 um 11:00 schrieb Felix Natter [via Freeplane Developer]:
>> "Volker Börchers [via Freeplane Developer]"
>>  > Are these libraries also usable from scripts, e.g. does this formula
>> work?
>>  >
>>  >    =org.apache.commons.io.FileUtils.ONE_KB
>>
>> This still works.
>
> Great.
>
>>  > There is a wiki page that promises some libraries to be available to
>>  > scripts:
>>  >
>>  >
>> http://freeplane.sourceforge.net/wiki/index.php/Scripting:_Included_libraries
>>
>> The problem with things like jlatexmath is that we currentliy only use
>> them in the respective plugins (and do not Export-Package: them).
>> --> they are probably not available for scripting.
>
> It would be a good result if this would be the only "lost library".

It's not the only one, I'm afraid. freeplane_plugin_openmaps is using
JMapViewer, which is also not exported. It would be suprising for me, if
the batik/svg stuff were available from scripting/groovy, too (also in
the old ant world!).

>>  > Most projects I know do not store .settings but let Eclipse generate
>>  > them on project import. Are you sure that the .settings are of any use?
>>
>> I think it is common practice with gradle to to store the (possibly sets
>> of) settings somewhere in version control, and copy these settings at
>> "gradle eclipse" time to all/the respective projects.
>
> Ok, but my suggestion is to keep only these eclipse settings which are
> strictly required (none, I suppose) and add more only if problems
> arise.

Yes, but I think a few important things should be kept like PDE
settings, the encodings in org.eclipse.core.resources.prefs and
org.eclipse.core.runtime.prefs (line.separator=\n).

Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane-gradle: eclipse settings

Dimitry Polivaev
Administrator
In reply to this post by Felix Natter
Hallo Felix,


> hello Dimitry,
>
>  > I can not see any problem. Where exactly is the workaround implemented?
>
> Here is what I did:
> - mkdir workspaces/freeplane_gradle
> - cd workspaces/freeplane_gradle
> - git clone https://github.com/freeplane/freeplane.git
> - cd freeplane
> - git checkout Gradle_builds
> - gradle clean build cleanEclipse eclipse
> - start eclipse on workspaces/freeplane_gradle
>    - File->Import->Existing projects into workspace
>      (root = .../workspaces/freeplane_gradle/freeplane)
>    - select all, hit finish
>    - copy freeplane-osgi.launch to
>      <workspace>/.metadata/.plugins/org.eclipse.debug.core/.launches/
>      and restart eclipse
>    - run freeplane-osgi.launch

As maven repository could not be resolved I fixed it, the fix is committed.
I created new freeplane_dev project at the old location and just launched using launcher from 1.4.x
I have not got any troubles by launch.

I suggest to look at it together using team viewer.

Regards,
Dimitry

Reply | Threaded
Open this post in threaded view
|

Re: Freeplane-gradle: eclipse settings

Felix Natter
Administrator
"Dimitry Polivaev [via Freeplane Developer]"
<[hidden email]> writes:

> Hallo Felix,
>
>> hello Dimitry,

hi Dimitry,

>>  > I can not see any problem. Where exactly is the workaround implemented?
>>
>> Here is what I did:
>> - mkdir workspaces/freeplane_gradle
>> - cd workspaces/freeplane_gradle
>> - git clone https://github.com/freeplane/freeplane.git
>> - cd freeplane
>> - git checkout Gradle_builds
>> - gradle clean build cleanEclipse eclipse
>> - start eclipse on workspaces/freeplane_gradle
>>    - File->Import->Existing projects into workspace
>>      (root = .../workspaces/freeplane_gradle/freeplane)
>>    - select all, hit finish
>>    - copy freeplane-osgi.launch to
>>      <workspace>/.metadata/.plugins/org.eclipse.debug.core/.launches/
>>      and restart eclipse
>>    - run freeplane-osgi.launch
>
> As maven repository could not be resolved I fixed it, the fix is committed.
> I created new freeplane_dev project at the old location and just launched using launcher from 1.4.x
> I have not got any troubles by launch.

I have just updated my repo, built using the steps above and I don't
see this error either any more. Blair also does not.

I could imagine that this a sideeffect of the
natures:='org.eclipse.pde.PluginNature' change?

> I suggest to look at it together using team viewer.

I agree with Blair in that we should ignore this until it pops up again.

Best Regards,
--
Felix Natter