Log of the #nice channel on irc.freenode.net

<arjanb>no more questions for today?00:33
* alexgreif leaves00:51
* arjanb leaves01:00
<bonniot>if you only want copying code yourself, there is no license problem, because you are the copyright holder16:51
so you can make the plugin GPL, and copy some of it for flow4j, and license flow4j as you wish16:52
<alexgreif>I only want to avoid writing the same code in two ways becasue of license issues
<bonniot>that cannot happen
<alexgreif>ok, if Im the c-holder then its fine16:54
Im going with the kids to the playground... cu later17:18
* alexgreif leaves
<bonniot>field override is almost ready now:19:33
i just added the check that the new type is smaller than the original one19:34
(not trivial when there are type parameters...)
i just did not implement overriding the default field value, but i'll do that later
cu, i have to go19:41
* bonniot leaves19:42
* alexgreif joins20:44
<arjanb>has porting to nice become easy?21:54
<alexgreif>yes it became easy until now!21:59
I have a major problem that is IMO nicec related:
in the package net.sf.nice.core I have a class NiceProject22:00
there on toplevel I declare the followind:
let String MAIN_PACKAGE_STORE_ID = NICE_PLUGIN_ID + ".main_package_store_id";
in package net.sf.nice.ui.properties I have a class NiceProjectPropertyPage that has a method22:01
void storeValues() {
IResource resource = cast(this.getElement());
if the line with println is uncommented then the whole plugin crashes
but if I use :22:03
println(""+new QualifiedName(NICE_PLUGIN_ID, MAIN_PACKAGE_STORE_ID));
the everything is fine.
the correct packages are included
<arjanb>what error do you get on crash?22:04
<alexgreif>do you have an idea? eclipse says nothing about the error kind, just that it cannot initialize the plugin
I try to run it in a nother mode, maybe I get more messages...wait
no... unfortunately no more messages22:07
<arjanb>does eclipse has a console window?
<alexgreif>you mean console from that eclipse is started?22:08
<alexgreif>no, I strat ut by doubleclick from the desktop
<arjanb>with a console you could put a try { .... } catch(Exception e) { e.printStackTrace(); } around the crashing lines22:10
<alexgreif>Inside eclipse I can start a new workbench, that has a console in the first opened workbench...22:11
all system.out is printed there...22:12
I tried the try catch, but no exception is thrown, because the plugin not even starts
I think that the jar is damaged somehow, because the affected line is in method store...() that is not needed for starting eclipse22:13
the affected method is only called in a properties panel, but the plugin does not start up, so I never see the panel itself22:14
<arjanb>have you tried to move the global constant to .ui.properties package?
<alexgreif>could you check the jar file for class-file consistency?
not yet22:15
I will do that...wait
the test is running, after that I can put the constants in the class itself or even in the method...22:16
<arjanb>so you have a bytecode tester?22:17
<alexgreif>if its in the same file as the class with the affected method then it runs fine!22:18
if its in another package then it seems to crash
<arjanb>maybe was there some circular depency between global constant22:19
<alexgreif>I try to eliminate them...22:21
<arjanb>i don't think all depency are visible some could be caused by the way global constant\variables are compiled22:27
a simple rule is to put the constant in the package that uses them22:28
<alexgreif>is it a must?
and what if more packages use it?
ok I have the reason:22:29
the following does not crash:
let String MAIN_PACKAGE_STORE_ID = NICE_PLUGIN_ID + ".main_package_store_id";
let QualifiedName MAIN_PACKAGE_STORE_ID_QNAME = new QualifiedName(NICE_PLUGIN_ID, NICE_PLUGIN_ID + ".main_package_store_id");
but the following crashes:22:30
let String MAIN_PACKAGE_STORE_ID = NICE_PLUGIN_ID + ".main_package_store_id";
<arjanb>try to reverse the order of these two constants22:31
<alexgreif>the line order?
<alexgreif>test is running ...22:32
btw are you learning for tests now?
changing the order brings the same error22:33
Exception creating editor: Unable to instantiate editor: net.sf.nice.nice_file_editor org.eclipse.core.runtime.CoreException: Plug-in net.sf.nice was unable to load class net.sf.nice.ui.editors.NiceFileEditor.
the crash has the effect that classes are not found. strange22:34
<arjanb>i have no idea what these classloader try to do22:35
but you have some workarounds for now and i will try to make a testcase of these problems22:37
<alexgreif>do you think the reason is in the constructor of QualifiedName?22:38
<arjanb>maybe what is the constructor and initializer?
<alexgreif>or in the way how nicec resolves MAIN_PACKAGE_STORE_ID?
of what?22:39
<arjanb>of QualifiedName22:40
<alexgreif>javadoc tells:
QualifiedName(String??qualifier, String??localName)
so strings are passed to the constructor
then its a nicec issue. isnt it?22:41
<alexgreif>should I try to make a slef-contained example?
<arjanb>not necessary it's related to a known bug22:42
<alexgreif>ah ok, so I use the workaroung to make progress with the plugin. ok?
<arjanb>in which package is NICE_PLUGIN_ID declared?22:49
<alexgreif>in the same as the other constants too22:51
in net.sf.nice.core
<arjanb>and did you compile the plugin at once with nicec?
<alexgreif>yes with and also without -R
main package was net.sf.core
with the -a option
<arjanb>i'm not successful at reproducing this problem could you store a copy of the current source23:06
is java.lang.util automatically importer in packages?23:09
Q: I extand a abstract java class and want to implement an abstract protected method like:23:12
build(kind, argsMap, aMonitor) {...}
but nicec tessl me:
No method called build is compatible with these patterns
<arjanb>what is the class where build is defined23:14
<alexgreif>class NiceBuilder extends IncrementalProjectBuilder
IncrementalProjectBuilder is the abstract class
<arjanb>which package?23:15
<alexgreif>package net.sf.nice.core;
or you mean of the abstract class: org.eclipse.core.resources23:16
build is defined in org.eclipse.core.resources.IncrementalProjectBuilder23:17
<arjanb>yes i found it it use a Map that isn't but it hasn't type parameter in that method declaration
so you need to retype it
<alexgreif>you look in the online eclipse javadoc?23:18
<alexgreif>is java.lang.util automatically importer in packages?23:19
<K,V> IProject[] build(int, Map<K,V>, ?IProgressMonitor) = native ...23:21
<alexgreif>I almost got it ... thanks23:22
without the ?23:24
<arjanb><String K, String V> IProject[] build(int, ?Map<K,V>, ?IProgressMonitor) = native ...23:25
<alexgreif>it compiled fine with:
<K,V> IProject[] build(IncrementalProjectBuilder, int, Map<K,V>, IProgressMonitor)
<arjanb>these argument maybe null according to the documentation23:26
and that it is a Map string to string you will problably need in the implementation23:27
<alexgreif>Incorrect type in assignment to monitor(this)
Found : ?org.eclipse.core.runtime.IProgressMonitor(aMonitor)
Expected: org.eclipse.core.runtime.IProgressMonitor
<arjanb>you need to check that the argument isn't null first23:28
simplified retyping: IProject[] build(int, ?Map<String,String>, ?IProgressMonitor) = native ...23:43
it's not easy to see the best one at first ?IProject[] build(int, ?Map<String,String>, ?IProgressMonitor) = native ...23:47
<alexgreif>and which one is better?23:49
<arjanb>untill now the last one23:50
<alexgreif>Im going to bed - cu tomorrow00:03
* alexgreif leaves

Generated by Sualtam