Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Version of PV Table with : 4.3.2 #1587

Merged
merged 6 commits into from Mar 3, 2016

Conversation

charlesHenryPATARD
Copy link
Contributor

#1515

  • Table Export to Excel
  • New column Save TimeStamp (ablity to hide column with preference)
  • Configuration list with header #conf#
  • Multiple snapshot of configuration list called Measures

First contribution of Spiral2 Project. Hope there will be plenty others.

- Table Export to Excel
- New column Save TimeStamp (ablity to hide column with preference)
- Configuration list with header #conf#
- Multiple snapshot of configuration list called Measures
@berryma4 berryma4 added this to the 4.3.0 - testing (master) milestone Feb 3, 2016
@berryma4
Copy link
Member

berryma4 commented Feb 3, 2016

@kasemir can you review, thank you!

@kasemir
Copy link
Contributor

kasemir commented Feb 5, 2016

org.csstudio.display.pvtable.test/.classpath changes org.eclipse.jdt.launching.JRE_CONTAINER to a specific SE1.7. We'd like to keep that as just JRE_CONTAINER.
Similarly, the .classpath file and MANIFEST.MF got changed, they need to stay as before.
There should be no new reference to a libs/junit-4.12.jar (if at all, use existing Eclipse JUnit plugin), nor libs/lib/log4j-1.2.17.jar (we use java.util.logging), nor libs/poi-examples-3.13-20150929.jar and so on.

If the PVTable now needs org.apache.poi as indicated in the pom.xml, that should be added to the 3rd party module so it becomes part of the target platform.

pv_table.xsd introduces a new element "nbMesure". All the existing XML elements are in English with underscores as separators. So maybe use "measurements" or "measure_count" or "number_of_measurements" instead of changing format and language.
pvtable/Messages.java mostly kept language and formatting to English and CamelCase, except for using both "..Measure.." and "..Mesure..", a mix that permeates the rest of the *.java code.

Can you fix these cosmetics, and then we merge.

- classpath on MANIFEST.MF for pvtable and pavtable.test
- extraction of librairies poi and xmlbeans : two plugins have been
created for that : org.csstudio.platform.libs.poi and
org.csstudio.platforms.libs.xmlbeans. Those plugins have been added to
thirdparty features
- Each words mesure have been replaced by measure. Internationalization
of some sentences stay in French.
- correction of pv_table.xsd file. Change nbMesure by measure_count.
@charlesHenryPATARD
Copy link
Contributor Author

Hello,
So I make all corrections you asked in last post @kasemir. Can you validate check list below :

  • org.eclipse.jdt.launching.JRE_CONTAINER to a specific SE1.7 changed like before
  • MANIFEST.MF changed like before
  • Use of org.junit and log4j from target platform (third party)
  • Creation of two new plugins one for poi jars named org.csstudio.platform.libs.poi and one for xmlbeans jar named org.csstudio.platform.libs.xmlbeans
  • Adding the two new plugins in third-party plugins (I forked the https://github.com/ControlSystemStudio/cs-studio-thirdparty.git)
  • Correction of pv_table.xsd change nbMesure to measure_count
  • Correction Messages.java
  • Correction in *.java -> replace mesure by measure

So, now I propose you two pull requets :

  • The fisrt one for pv_table in original cs-studio git repository
  • The second in third-party repository

Can you confirm ?

Thanks.

@kasemir
Copy link
Contributor

kasemir commented Feb 12, 2016

Clarification on the external code for poi and xmlbeams:
Originally, you included those *.jar files in the potable plugin and listed them in the Bundle-ClassPath.
But we decided to remove external jar files whenever possible from the cs-studio sources.

You could create new *poi and *xmlbeams plugins, add them to the 3rd party module as I had mentioned in my comment. Thinking about it once more, I assume what we really want is to simply "use" external code, if possible, by listing it in the maven-osgi-repo, so building that repo will pull the binaries from somewhere and we don't need to add copies of the binaries into our repos. Technically this means finding the *poi and *xmlbeams jar files in some maven repo so that the pom files in our maven-osgi-bundles module can wrap them as plugins. Or maybe the *poi and *xmlbeans code is already in some Eclipse orbit repo wrapped as a plugin? Eric @berryma4 knows more about this. If the *poi and *xmlbeans code is not in an existing maven or Eclipse repo, then yes, we need to put a copy into our cs-studio-thirdparty module.

<classpathentry exported="true" kind="lib" path="libs/poi-ooxml-schemas-3.13-20150929.jar"/>
<classpathentry exported="true" kind="lib" path="libs/poi-scratchpad-3.13-20150929.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are any of these in orbit? If not, they should be added to the maven-osgi-bundles repo (which wraps artifacts from maven central into bundles and puts them into our p2).

<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.13</version>
</dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you move the dependencies to the manifest now that they are in the maven-osgi-bundles p2?

@charlesHenryPATARD
Copy link
Contributor Author

Hello,
Just pushed the dependencies correction like you just asked @berryma4.
For PV Table It remains an issue. I get the plugins from http://download.controlsystemstudio.org/maven-osgi-bundles/4.3 and update my Target Platform. After that add dependencies to org.csstudio.display.pvtable. I've got no problems compile-time mode. But in runtime this following error is display :

2016-02-24 16:35:18.849 GRAVE [Thread 1] org.csstudio.logging.PluginLogListener (logging) - Unhandled event loop exception java.lang.NoClassDefFoundError: org/apache/poi/xssf/usermodel/XSSFWorkbook at org.csstudio.display.pvtable.ui.ExportXLSAction.run(ExportXLSAction.java:56) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:462) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1329) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3819) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3430) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.csstudio.spiral2_dev.utility.product.Workbench.runWorkbench(Workbench.java:123) at org.csstudio.startup.application.Application.startApplication(Application.java:264) at org.csstudio.startup.application.Application.start(Application.java:118) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) at org.eclipse.equinox.launcher.Main.run(Main.java:1515) at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
Classpath contains the missing class. I misunderstood.

@kasemir
Copy link
Contributor

kasemir commented Feb 24, 2016

How do you build your target platform?
What you have in there and what you have in the class path while working on code in the IDE may be different.

When I put http://.. into the IDE's target platform, I mostly get long delays and errors.
Here's what I do:

  1. Compile everything on the command line with maven, using the 'make.sh' and settings shown in https://github.com/ControlSystemStudio/org.csstudio.sns/tree/master/build

This compiles everything:
diirt maven-osgi-bundles cs-studio-thirdparty cs-studio org.csstudio.sns
You might want to replace org.csstudio.sns with your products.

Maven fetches dependencies from the remote repos. Depending on your luck, that can be slow or fail, but in the end, each compiled module has a P2 repository and all is local on your disk.
I list them all in a "composite repository" like https://github.com/ControlSystemStudio/org.csstudio.sns/tree/master/css_repo
Step 1 actually already uses that same composite repo itself.

  1. That composite repo can now be used as the 'target platform' of the IDE.
    Alternatively, I can also use the 'plugins' directory of my maven-build SNS CSS product, it has 99% the same content. Either way, it's consistent and local.

@charlesHenryPATARD
Copy link
Contributor Author

Hi,
Here we are !!! 24 hours to understand that org.apache.poi and org.apache.poi.ooxml plugins have a common package named org.apache.poi.ss.username. I had this beautiful error on CSS startup 👎 :

`!ENTRY org.csstudio.display.pvtable 4 0 2016-02-25 14:41:06.423
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.csstudio.display.pvtable [428]
Bundle was not resolved because of a uses contraint violation.
org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.csstudio.display.pvtable [osgi.identity; osgi.identity="org.csstudio.display.pvtable"; type="osgi.bundle"; version:Version="4.3.1.qualifer"; singleton:="true"] because it is exposed to package 'org.apache.poi.ss.usermodel' from resources org.apache.poi [osgi.identity; osgi.identity="org.apache.poi"; type="osgi.bundle"; version:Version="3.13.0"] and org.apache.poi.ooxml [osgi.identity; osgi.identity="org.apache.poi.ooxml"; type="osgi.bundle"; version:Version="3.13.0"] via two dependency chains.

Chain 1:
org.csstudio.display.pvtable [osgi.identity; osgi.identity="org.csstudio.display.pvtable"; type="osgi.bundle"; version:Version="4.3.1.qualifer"; singleton:="true"]
require: (&(osgi.wiring.bundle=org.apache.poi)(bundle-version>=3.13.0))
|
provide: osgi.wiring.bundle: org.apache.poi
org.apache.poi [osgi.identity; osgi.identity="org.apache.poi"; type="osgi.bundle"; version:Version="3.13.0"]

Chain 2:
org.csstudio.display.pvtable [osgi.identity; osgi.identity="org.csstudio.display.pvtable"; type="osgi.bundle"; version:Version="4.3.1.qualifer"; singleton:="true"]
import: (osgi.wiring.package=org.apache.poi.xssf.usermodel)
|
export: osgi.wiring.package: org.apache.poi.xssf.usermodel; uses:=org.apache.poi.ss.usermodel
export: osgi.wiring.package=org.apache.poi.ss.usermodel
org.apache.poi.ooxml [osgi.identity; osgi.identity="org.apache.poi.ooxml"; type="osgi.bundle"; version:Version="3.13.0"]
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
`
I needed to put org.apache.poi in required plugins and org.apache.poi.xssf.usermodel in imported package for org.csstudio.diplay.pvtable plugin.
I've just pushed the correction. Can you test it ?

Thanks for advises but it's a little more difficult when it's the first time.

@berryma4
Copy link
Member

berryma4 commented Mar 2, 2016

Status?

@charlesHenryPATARD
Copy link
Contributor Author

Every thing is ok for me. I committed and pushed the last version.

@berryma4
Copy link
Member

berryma4 commented Mar 3, 2016

@kasemir , okay for merge?

@kasemir
Copy link
Contributor

kasemir commented Mar 3, 2016

Charles Henry, thanks for following up on all the little things!

Eric, I can't tell if all is fine with the POI code now in 3rd party or maven because my build has been broken with errors like these for a week:

[ERROR]   Cannot satisfy dependency: org.csstudio.applications.channel.feature.feature.group 1.1.3.qualifier depends on: org.csstudio.channel.opiwidgets 0.0.0

or

[ERROR]   Missing requirement: org.csstudio.service.unitconversion 1.0.0.qualifier requires 'bundle gov.bnl.unitconversion 1.0.0' but it could not be found

They all seem related to BNL or channel code, so I'll wait for Kunal to return.

Meanwhile, I'm OK with merging the table changes.

berryma4 added a commit that referenced this pull request Mar 3, 2016
New Version of PV Table with : 4.3.2
@berryma4 berryma4 merged commit 832e8ab into ControlSystemStudio:master Mar 3, 2016
@berryma4
Copy link
Member

berryma4 commented Mar 3, 2016

I get an error on jenkins:
org.csstudio.display.pvtable: OSGi version 4.3.1.qualifer must have .qualifier qualifier for SNAPSHOT builds -> [Help 1]

@berryma4
Copy link
Member

berryma4 commented Mar 3, 2016

added #1642

@berryma4
Copy link
Member

berryma4 commented Mar 3, 2016

typo in the word qualifier, I should have read the error more clearly.

@berryma4
Copy link
Member

berryma4 commented Mar 3, 2016

We have a few compile problems: https://openepics.ci.cloudbees.com/job/cs-studio-applications-display-master/44
Also, it might be nice to fix the tabs (check style errors)

This was referenced Mar 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants