-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: WTP version numbering 0.7.0, hibernate ships with 1.0.0 ?
PostPosted: Fri Jul 01, 2005 12:04 pm 
Regular
Regular

Joined: Sun May 08, 2005 2:48 am
Posts: 118
Location: United Kingdom
With Eclipse 3.1 and WTP stabalizing towards version 0.7, is there a Hibernate tools project that does not include any overlapping plugin bundles ?

The WTP components in the latest hibernate tools bundle are version 1.0.0, however I believe a renumber took place so the current version is now set to 0.7 (1.0 is a long down the roadmap).

Please check out the latest WTP at:

http://www.eclipse.org/webtools/develop ... 0.7M5.html


Is it safe to just cut the {plugins,features}/org.hibernate.* and leave the rest out ?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 01, 2005 7:40 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
current hibernate tools (mapper plugin) don't compile with wtp M5 because changes in structured editor

regards


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 02, 2005 3:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
WTP and eclipse project milestone versioning is a hell!

They dont bump version numbers between releases so no one can see that there is a difference....and now with 0.7 they are not even bumping they are debumping - meaning an updatesite has no chance at all.

now that WTP 0.7M5 is out we have a new base to work with which I will sync up with as soon as possible.

Patches are very much welcome ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 12:46 pm 
Regular
Regular

Joined: Sun May 08, 2005 2:48 am
Posts: 118
Location: United Kingdom
max wrote:
Patches are very much welcome ;)


Trying to have a go :)... I have Hibernate building into v3.1. There appears to be a missing:

build.sh copydocs

facility to make a .css file available in the hibernate-3.1/ tree to assist HibernateExt building.


What are the goals of the patches you will accept to:

1) Make hibernate compile with the current WTP ?
2) Make hibernate conform to WTP public APIs ?

In looking over the source and build I only found one file which did not compile due to changes in Eclipe APIs. I managed to find a WTP mailing list snipped that covered what looks like the same issue and how to change refactor the applicaiton.

However I have no **** clue if my change works and am unsure of how to test those exact lines of code work the same.


There are loads of depreciated API usage, again looking at some of these there are some alternative ways of doing things that seem to compile.

Are shot in the dark patches any use to you at all, or will they just waste your time ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 1:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i had a go last night on moving to WTP M5, but they changed something with respect to how xml editors are being recognized.

any contribution on how to make it work (meaning have the xml editor startup consistently with our code completion and outline would be appreciated)

Also conversion of deprecated/internal to non-deprecated/public api is also welcome (but i dont think it is easy to do since M5 is about deprecating/internalizing API without necessarily adding some replacements before version 1)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 2:46 pm 
Regular
Regular

Joined: Sun May 08, 2005 2:48 am
Posts: 118
Location: United Kingdom
Maybe this is not the best place to post it, but this fragment is the only part of the org.hibernate.eclipse.* that had compilcation errors against the HEAD checked out 20 hours ago.

I have no clue at all if my changes are correct so am I bit suspect about putting them on JIRA, but all the eclipse parts don't show up with build errors against the 3.1 platform and WTP M5.

This diff is complete untested and my best guess from the API javadoc documentation and a mailing list post I found to do with getTextEditor(). If more stuff like this is helpful I'll carry on bashing around at the keyboard.

Code:
diff -u -r1.2 ReverseEngineeringMultiPageEditor.java
--- ./org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringMultiPageEditor.java      18 Jun 2005 23:36:57 -0000       1.2
+++ ./org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringMultiPageEditor.java      5 Jul 2005 18:38:03 -0000
@@ -12,6 +12,7 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.swt.events.ShellAdapter;
import org.eclipse.swt.events.ShellEvent;
@@ -32,7 +33,9 @@
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.core.internal.provisional.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.ui.internal.StructuredTextEditor;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
import org.eclipse.wst.xml.core.internal.provisional.IXMLPreferenceNames;
+import org.eclipse.wst.xml.ui.internal.provisional.IDOMSourceEditingTextTools;
import org.eclipse.wst.xml.ui.internal.provisional.StructuredTextEditorXML;
import org.hibernate.eclipse.mapper.MapperPlugin;
import org.hibernate.eclipse.mapper.editors.reveng.OverrideFormPage;
@@ -336,40 +339,48 @@
         * IExtendedMarkupEditor method
         */
        public Node getCaretNode() {
-               if (getTextEditor() == null)
-                       return null;
+               try {
+                       IDOMSourceEditingTextTools dom = (IDOMSourceEditingTextTools) getAdapter(IDOMSourceEditingTextTools.class);
+                       if (dom == null)
+                               return null;

-               return getTextEditor().getCaretNode();
+                       return dom.getNode(dom.getCaretOffset());
+               } catch(BadLocationException e) {
+                       return null;
+               }
        }

        /**
         * IExtendedSimpleEditor method
         */
        public int getCaretPosition() {
-               if (getTextEditor() == null)
+               ISourceEditingTextTools sse = (ISourceEditingTextTools) getAdapter(ISourceEditingTextTools.class);
+               if (sse == null)
                        return -1;
-
-               return getTextEditor().getCaretPosition();
+
+               return sse.getCaretOffset();
        }

        /**
         * IExtendedSimpleEditor method
         */
        public IDocument getDocument() {
-               if (getTextEditor() == null)
+               ISourceEditingTextTools sse = (ISourceEditingTextTools) getAdapter(ISourceEditingTextTools.class);
+               if (sse == null)
                        return null;

-               return getTextEditor().getDocument();
+               return sse.getDocument();
        }

        /**
         * IExtendedMarkupEditor method
         */
        public Document getDOMDocument() {
-               if (getTextEditor() == null)
+               IDOMSourceEditingTextTools dom = (IDOMSourceEditingTextTools) getAdapter(IDOMSourceEditingTextTools.class);
+               if (dom == null)
                        return null;

-               return getTextEditor().getDOMDocument();
+               return dom.getDOMDocument();
        }

        /**


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 4:15 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
these methods we actually dont need to implement (but im actually not sure) ... we need to test ;)

do you get the hbm.xml editor with code completion and an outline that shows the first attribute for xml tags ? (that is the best test)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 11:33 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
I try with this patch and it work

- code completion and outline is fine

I change catalogContributor extension from
org.eclipse.wst.xml.uriresolver.catalogContributor
to
org.eclipse.wst.xml.core.catalogContributor

and wst show catalog fine

regards


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 06, 2005 1:04 am 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Max, dlmiles

Can you build hibernate-tools plugins in eclipse 3.1 ?
I work on linux (jdk 1.5.0_04) and plugin work fine in runtime workbench, but when I try export
features (or one plugin like org.hibernate.eclipse), I get more error like (class xxx cannot be resolved )

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 06, 2005 3:32 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
snpesnpe wrote:
I try with this patch and it work

- code completion and outline is fine

I change catalogContributor extension from
org.eclipse.wst.xml.uriresolver.catalogContributor
to
org.eclipse.wst.xml.core.catalogContributor

and wst show catalog fine

regards


please send a complete patch into JIRA for this.

I only get code completion - the outline is still the default outline, not the hibernate tools outline.

regarding export I haven't done that yet because of the above.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 06, 2005 4:17 am 
Regular
Regular

Joined: Sun May 08, 2005 2:48 am
Posts: 118
Location: United Kingdom
snpesnpe wrote:
I try with this patch and it work

- code completion and outline is fine


Can you point me in the direction of a good plugin development guide ?

How do I take the project code and load / flush-reload it into the Eclipse I'm developing it on?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 06, 2005 4:21 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Read http://www.hibernate.org/268.html

and when it seem to compile/build then just click "Run..." and run an Eclipse Application.

should work out-of-the-box

basic beginners guide is in the eclipse help. Just press F1 and read PDE Guide (especially "Basic plug-in tutorial")

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 06, 2005 7:26 am 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Quote:
basic beginners guide is in the eclipse help. Just press F1 and read PDE Guide (especially "Basic plug-in tutorial")


... and eclipse articles and specialy Contributed to eclipse by Erich Gama and Kent Beck

regards


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 06, 2005 7:46 am 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Quote:
please send a complete patch into JIRA for this.

I only get code completion - the outline is still the default outline, not the hibernate tools outline.

regarding export I haven't done that yet because of the above.


Max,
I make screenshoot http://www.snpe.co.yu/reverseEditor.png

Is it fine

I do nothing except dlmiles's patch and change catalogCotnributor

This work in runtime workbench.I can't export plugins with eclipse 3.1 - I think that exists bug in
plugin export wizard

regards


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 06, 2005 11:49 am 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
I play with hibernate-tools and wtp m5, yet

first try :

- download new eclipse 3.1 sdk (linux)
- gef sdk 20050630
- emf-sdo-xsd sdk 2.1.0 rc1
- ve sdk 20050630
- wtp M5 sdk

apply dlmiles' patch and chanhe catalogContributor in hibernate plugins (current cvs)

it work in runtiem workbench

export hibernate feature (export deployable feature) and it make jarred plugins - it doesn't work - I can't open cfg.xml or hbm.xml (NPE)

export 'deployable plugins and fragment' and select all hibernate plugins (except test)
It work fine

regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.