Announcement Announcement Module
Collapse
No announcement yet.
Jide integration breaks down Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jide integration breaks down

    Hi

    The JIDE integration breaks down when checking out the latest code. The WorkspaceView does not show. Anyone knows what it is?

    Magnus

  • #2
    The JIDE integration code is written against the release version, currently 0.1. When another release occurs I'll update the code.

    There have been a number of refactorings (is that a word?) that effect the integration, and some more are currently being discussed on the developers list. Since these are ongoing I see no point in chasing a moving target in attempting to keep the integration code compatible with the SVN trunk branch.

    hope that clarifies things,
    Jonny

    Comment


    • #3
      Jira integration

      Hi Johnny

      Well I really cant say it helps since we have dependency on newer parts of spring rcp then 0.1. I guess I'll have to solve this myself then. Could you give some pointers where to look if you have some? Any one else?

      What has been the changes since yesterday that can have this affect, maybe some of the developer could give me some pinters where to look since it is not an option to rollback to 0.1 for us.

      Cheers

      Magnus

      Comment


      • #4
        Magnus,

        My guess is that it has to do with the recent commits mentioned in this thread from the developers list:

        http://thread.gmane.org/gmane.comp.j...235/focus=3563

        My guess is that you're going to be chasing a moving target keeping the two code bases compatible as I think more changes along these lines are in the works. Could you standardize on the code base from a couple of days ago that worked?

        Jonny

        Comment


        • #5
          Standarize

          Hi Jonny

          Yes maybe we have to do that. I found the ApplicationWindowFactory where the JideApplicationWindow needs to be created I'll try that out for a while and if I fail rollback 2 days or so.
          Thanks for your help I'll let you know if I get it up nd running. Its also a bit of a sport keeping up with the refactoings to keep my understanding about the framework as high as possible.

          Again thanks for you time

          Cheers
          MAgnus

          Comment


          • #6
            Solution

            To continue working with the latest spring rcp source and jide you need to create a ApplicationWindowFactory like so:

            public class JideApplicationWindowFactory implements ApplicationWindowFactory{
            private String profileKey;
            private boolean saveLayoutOnClose;
            private int doubleClickAction;
            private boolean heavyweightComponentEnabled;
            private boolean showWorkspace;
            private boolean showGripper;

            public ApplicationWindow createApplicationWindow(){
            JideApplicationWindow applicationWindow = new JideApplicationWindow();
            applicationWindow.setProfileKey(profileKey);
            applicationWindow.setSaveLayoutOnClose(saveLayoutO nClose);
            applicationWindow.setDoubleClickAction(doubleClick Action);
            applicationWindow.setHeavyweightComponentEnabled(h eavyweightComponentEnabled);
            applicationWindow.setShowWorkspace(showWorkspace);
            applicationWindow.setShowGripper(showGripper);
            return applicationWindow;
            }

            public void setProfileKey(String profileKey)
            {
            this.profileKey = profileKey;
            }

            public void setSaveLayoutOnClose(boolean saveLayoutOnClose)
            {
            this.saveLayoutOnClose = saveLayoutOnClose;
            }

            public void setDoubleClickAction(int doubleClickAction)
            {
            this.doubleClickAction = doubleClickAction;
            }

            public void setHeavyweightComponentEnabled(boolean heavyweightComponentEnabled)
            {
            this.heavyweightComponentEnabled = heavyweightComponentEnabled;
            }

            public void setShowWorkspace(boolean showWorkspace)
            {
            this.showWorkspace = showWorkspace;
            }

            public void setShowGripper(boolean showGripper)
            {
            this.showGripper = showGripper;
            }
            }

            It replaces the earlier JideApplicationWindow configuration:

            <bean id="applicationWindowFactory" class="se.so4it.dam.client.jide.docking.JideApplic ationWindowFactory">
            <property name="profileKey" value="DamClientLayout"/>
            <property name="saveLayoutOnClose" value="true"/>
            <property name="doubleClickAction" ref="com.jidesoft.docking.DockingManager.DOUBLE_CL ICK_TO_MAXIMIZE"/>
            <property name="heavyweightComponentEnabled" value="true"/>
            <property name="showWorkspace" value="true"/>
            <property name="showGripper" value="true"/>
            </bean>

            Add it to the services also:

            <bean id="applicationServices"
            class="org.springframework.richclient.application. support.DefaultApplicationServices">
            <property name="imageSource" ref="imageSource"/>
            <property name="securityControllerManager" ref="securityControllerManager"/>
            <property name="iconSource" ref="iconSource"/>
            <property name="labeledEnumResolver" ref="labeledEnumResolver"/>
            <property name="messageSource" ref="messageSource"/>
            <property name="binderSelectionStrategy" ref="binderSelectionStrategy"/>
            <property name="conversionService" ref="conversionService"/>
            <property name="componentFactory" ref="componentFactory"/>
            <property name="rulesSource" ref="rulesSource"/>
            <property name="formComponentInterceptorFactory" ref="formComponentInterceptorFactory"/>
            <property name="applicationWindowFactory" ref="applicationWindowFactory"/>
            </bean>

            Cheers Magnus

            Comment


            • #7
              Magnus,

              thanks for the posting. I'll keep a note of it and use it to upgrade when the next version of the rcp comes out.

              I'm not actively working on UI stuff right now so I haven't really got the time to keep up with the refactorings, even though I'd like to. I'm planning on doing a one time update when the release happens.

              Glad you're finding the code useful by the way.

              Jonny

              Originally posted by magpor
              To continue working with the latest spring rcp source and jide you need to create a ApplicationWindowFactory like so:

              public class JideApplicationWindowFactory implements ApplicationWindowFactory{
              private String profileKey;
              private boolean saveLayoutOnClose;
              private int doubleClickAction;
              private boolean heavyweightComponentEnabled;
              private boolean showWorkspace;
              private boolean showGripper;

              public ApplicationWindow createApplicationWindow(){
              JideApplicationWindow applicationWindow = new JideApplicationWindow();
              applicationWindow.setProfileKey(profileKey);
              applicationWindow.setSaveLayoutOnClose(saveLayoutO nClose);
              applicationWindow.setDoubleClickAction(doubleClick Action);
              applicationWindow.setHeavyweightComponentEnabled(h eavyweightComponentEnabled);
              applicationWindow.setShowWorkspace(showWorkspace);
              applicationWindow.setShowGripper(showGripper);
              return applicationWindow;
              }

              public void setProfileKey(String profileKey)
              {
              this.profileKey = profileKey;
              }

              public void setSaveLayoutOnClose(boolean saveLayoutOnClose)
              {
              this.saveLayoutOnClose = saveLayoutOnClose;
              }

              public void setDoubleClickAction(int doubleClickAction)
              {
              this.doubleClickAction = doubleClickAction;
              }

              public void setHeavyweightComponentEnabled(boolean heavyweightComponentEnabled)
              {
              this.heavyweightComponentEnabled = heavyweightComponentEnabled;
              }

              public void setShowWorkspace(boolean showWorkspace)
              {
              this.showWorkspace = showWorkspace;
              }

              public void setShowGripper(boolean showGripper)
              {
              this.showGripper = showGripper;
              }
              }

              It replaces the earlier JideApplicationWindow configuration:

              <bean id="applicationWindowFactory" class="se.so4it.dam.client.jide.docking.JideApplic ationWindowFactory">
              <property name="profileKey" value="DamClientLayout"/>
              <property name="saveLayoutOnClose" value="true"/>
              <property name="doubleClickAction" ref="com.jidesoft.docking.DockingManager.DOUBLE_CL ICK_TO_MAXIMIZE"/>
              <property name="heavyweightComponentEnabled" value="true"/>
              <property name="showWorkspace" value="true"/>
              <property name="showGripper" value="true"/>
              </bean>

              Add it to the services also:

              <bean id="applicationServices"
              class="org.springframework.richclient.application. support.DefaultApplicationServices">
              <property name="imageSource" ref="imageSource"/>
              <property name="securityControllerManager" ref="securityControllerManager"/>
              <property name="iconSource" ref="iconSource"/>
              <property name="labeledEnumResolver" ref="labeledEnumResolver"/>
              <property name="messageSource" ref="messageSource"/>
              <property name="binderSelectionStrategy" ref="binderSelectionStrategy"/>
              <property name="conversionService" ref="conversionService"/>
              <property name="componentFactory" ref="componentFactory"/>
              <property name="rulesSource" ref="rulesSource"/>
              <property name="formComponentInterceptorFactory" ref="formComponentInterceptorFactory"/>
              <property name="applicationWindowFactory" ref="applicationWindowFactory"/>
              </bean>

              Cheers Magnus

              Comment


              • #8
                Hi Magnus,

                Thanks for this thread!

                BTW, where's the JideApplicationWindow? Could I replace by DockingApplicationWindow?

                Thanks,

                Mauro.

                Comment


                • #9
                  Hi Manus

                  The JideApplicationWindow is available in the Jide integration package provided as standalone at https://jide-springrcp.dev.java.net/

                  Thats an old version and you will need to do the changes I mentioned here manually.

                  I think jonny is coming out with a new integration on the next release of Spring rcp, this month I think maybe later.

                  Magnus

                  Comment


                  • #10
                    hi,

                    sorry for the late reply, just got back from vacation.

                    As was mentioned, the current integration code works against Spring RCP v0.1 and there's been a number of changes within the SVN head that effect this code. I'll be working on making these changes locally in the near future and once they're ready I'll commit and let people know.

                    This should be timed nicely with the next release of Spring RCP.

                    thanks,
                    Jonny

                    Originally posted by magpor
                    Hi Manus

                    The JideApplicationWindow is available in the Jide integration package provided as standalone at https://jide-springrcp.dev.java.net/

                    Thats an old version and you will need to do the changes I mentioned here manually.

                    I think jonny is coming out with a new integration on the next release of Spring rcp, this month I think maybe later.

                    Magnus

                    Comment


                    • #11
                      Hi Jonny,

                      I realy appreciate your efforts to synchronize with 0.2.0.
                      I've synchronized with RCP head today and I've changed some Jide-RCP code to keep the compatibility, but two things I couldn't sort out:
                      1. AbstractEditor.dispose
                      Code:
                          public void dispose()
                          {
                              context.register(GlobalCommandIds.SAVE, null);
                              context.register(GlobalCommandIds.SAVE_AS, null);
                              //descriptor.removePropertyChangeListener(context.getPage()); ????
                          }
                      2. When trying to close the application a nullPointer is happening:
                      Code:
                      java.lang.NullPointerException
                      	at org.springframework.richclient.application.support.DefaultApplicationPage.doRemovePageComponent(DefaultApplicationPage.java:58)
                      	at org.springframework.richclient.application.support.AbstractApplicationPage.close(AbstractApplicationPage.java:249)
                      	at org.springframework.richclient.application.support.AbstractApplicationPage.close(AbstractApplicationPage.java:269)
                      	at org.springframework.richclient.application.support.AbstractApplicationWindow.close(AbstractApplicationWindow.java:345)
                      	at com.jidesoft.spring.richclient.docking.DockingApplicationWindowCloseListener.windowClosing(DockingApplicationWindowCloseListener.java:54)
                      Could you help me, please?

                      Thanks,

                      Mauro.

                      Comment


                      • #12
                        I can't be certain but after a quick look at the source code it looks like the doRemovePageComponent of DefaultApplicationPage needs to be overridden as well. It refers to a instance variable control that will be null since the createControl is overridden. giveFocusTo also refers to the control instance variable so this also should be overridden.

                        that's my guess, although I haven't tested this.

                        Jonny

                        Originally posted by Manus
                        Hi Jonny,

                        I realy appreciate your efforts to synchronize with 0.2.0.
                        I've synchronized with RCP head today and I've changed some Jide-RCP code to keep the compatibility, but two things I couldn't sort out:
                        1. AbstractEditor.dispose
                        Code:
                            public void dispose()
                            {
                                context.register(GlobalCommandIds.SAVE, null);
                                context.register(GlobalCommandIds.SAVE_AS, null);
                                //descriptor.removePropertyChangeListener(context.getPage()); ????
                            }
                        2. When trying to close the application a nullPointer is happening:
                        Code:
                        java.lang.NullPointerException
                        	at org.springframework.richclient.application.support.DefaultApplicationPage.doRemovePageComponent(DefaultApplicationPage.java:58)
                        	at org.springframework.richclient.application.support.AbstractApplicationPage.close(AbstractApplicationPage.java:249)
                        	at org.springframework.richclient.application.support.AbstractApplicationPage.close(AbstractApplicationPage.java:269)
                        	at org.springframework.richclient.application.support.AbstractApplicationWindow.close(AbstractApplicationWindow.java:345)
                        	at com.jidesoft.spring.richclient.docking.DockingApplicationWindowCloseListener.windowClosing(DockingApplicationWindowCloseListener.java:54)
                        Could you help me, please?

                        Thanks,

                        Mauro.

                        Comment


                        • #13
                          Thanks Jonny!

                          Overriding doRemovePageComponent fixed the problem!

                          Mauro.

                          Comment


                          • #14
                            You can put from some part the code for the new version of JIdeIntegration while we wait definitive solution ? Thank'sYou can put from some part the code for the new version of JIdeIntegration while we wait definitive solution ? Thank's

                            Comment


                            • #15
                              Due to the restrictions of attachments size, following is only the code I've changed.

                              Hope it helps!

                              Mauro.

                              Comment

                              Working...
                              X