Commit 4214020b authored by Bonita CI's avatar Bonita CI
Browse files

Merge branch 'master' into 'R2D2-7.2'

parents 1d1bd6e5 4ee98f66
......@@ -123,4 +123,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
version="0.0.0"
unpack="false"/>
<plugin
id="org.bonitasoft.studio.expression.editor.win32"
os="win32"
ws="win32"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>
</feature>
......@@ -447,17 +447,6 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
version="0.0.0"
unpack="false"/>
<plugin
id="org.bonitasoft.studio.expression.editor.win32"
os="win32"
ws="win32"
arch="x86,x86_64"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>
<plugin
id="org.codehaus.groovy.eclipse.dsl"
download-size="0"
......@@ -599,4 +588,10 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
version="0.0.0"
unpack="false"/>
<plugin
id="apache-xerces"
download-size="0"
install-size="0"
version="2.9.0"/>
</feature>
......@@ -5,14 +5,12 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.bonitasoft.studio.common;
......@@ -20,64 +18,59 @@ import org.osgi.framework.Version;
/**
* @author Romain Bioteau
*
*/
public class ProductVersion {
//OEM Variable to be use for redirect urls
public static final String REDIRECT_URL_PRODUCT_ID = "bos";
//OEM Variable to be use for redirect urls
public static final String REDIRECT_URL_PRODUCT_ID = "bos";
public static final String VERSION_6_0_0_ALPHA = "6.0.0-Alpha";
public static final String CURRENT_VERSION = "7.2.0";
public static final String CURRENT_YEAR = "2015";
public static final String CURRENT_YEAR = "2016";
public static boolean sameVersion(final String version){
public static boolean sameVersion(final String version) {
return CURRENT_VERSION.equals(version);
}
public static boolean sameMinorVersion(final String version){
if(version == null){
return false ;
public static boolean sameMinorVersion(final String version) {
if (version == null) {
return false;
}
final String minor = CURRENT_VERSION.substring(0, CURRENT_VERSION.lastIndexOf(".")) ;
final String minor = CURRENT_VERSION.substring(0, CURRENT_VERSION.lastIndexOf("."));
final String[] split = version.split("\\.");
String testedVersion = version ;
if(split.length > 2){
testedVersion = split[0] + "." + split[1] ;
String testedVersion = version;
if (split.length > 2) {
testedVersion = split[0] + "." + split[1];
}
return minor.equals(testedVersion) ;
return minor.equals(testedVersion);
}
public static boolean canBeMigrated(final String version) {
if(version == null){
return false;
}
Version current = new Version("0.0.0");
try{
current = Version.parseVersion(version);
}catch(final IllegalArgumentException e){
}
final Version productVersion = new Version(CURRENT_VERSION);
return current.compareTo(productVersion) < 0;
}
public static boolean canBeImported(final String version) {
if(version == null){
return true;
}
Version current = new Version("0.0.0");
try{
current = Version.parseVersion(version);
}catch(final IllegalArgumentException e){
public static boolean canBeMigrated(final String version) {
if (version == null) {
return false;
}
Version current = new Version("0.0.0");
try {
current = Version.parseVersion(version);
} catch (final IllegalArgumentException e) {
}
final Version productVersion = new Version(CURRENT_VERSION);
return current.compareTo(productVersion) <= 0;
}
}
final Version productVersion = new Version(CURRENT_VERSION);
return current.compareTo(productVersion) < 0;
}
public static boolean canBeImported(final String version) {
if (version == null) {
return true;
}
Version current = new Version("0.0.0");
try {
current = Version.parseVersion(version);
} catch (final IllegalArgumentException e) {
}
final Version productVersion = new Version(CURRENT_VERSION);
return current.compareTo(productVersion) <= 0;
}
}
......@@ -5,5 +5,5 @@ Bundle-SymbolicName: org.bonitasoft.studio.expression.editor.win32;singleton:=tr
Bundle-Version: 7.2.0.qualifier
Bundle-Vendor: BonitaSoft S.A.
Fragment-Host: org.bonitasoft.studio.expression.editor;bundle-version="6.0.0"
Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32))
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32))
/*******************************************************************************
* Copyright (C) 2015 Bonitasoft S.A.
* Bonitasoft is a trademark of Bonitasoft SA.
* This software file is BONITASOFT CONFIDENTIAL. Not For Distribution.
* For commercial licensing information, contact:
* Bonitasoft, 32 rue Gustave Eiffel – 38000 Grenoble
* or Bonitasoft US, 51 Federal Street, Suite 305, San Francisco, CA 94107
*******************************************************************************/
package org.eclipse.gmf.runtime.lite.svg;
import java.io.IOException;
import java.io.InterruptedIOException;
import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
import org.apache.batik.util.XMLResourceDescriptor;
import org.apache.xerces.parsers.SAXParser;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
public class CustomSAXSVGDocumentFactory extends SAXSVGDocumentFactory {
public CustomSAXSVGDocumentFactory() {
super(XMLResourceDescriptor.getXMLParserClassName());
}
/*
* (non-Javadoc)
* @see org.apache.batik.dom.util.SAXDocumentFactory#createDocument(org.xml.sax.InputSource)
*/
@Override
protected Document createDocument(InputSource is) throws IOException {
try {
final XMLReader parser = new SAXParser();
parser.setContentHandler(this);
parser.setDTDHandler(this);
parser.setEntityResolver(this);
parser.setErrorHandler((errorHandler == null) ? this : errorHandler);
parser.setFeature("http://xml.org/sax/features/namespaces",
true);
parser.setFeature("http://xml.org/sax/features/namespace-prefixes",
true);
parser.setFeature("http://xml.org/sax/features/validation",
isValidating);
parser.setProperty("http://xml.org/sax/properties/lexical-handler",
this);
parser.parse(is);
} catch (final SAXException e) {
final Exception ex = e.getException();
if (ex != null && ex instanceof InterruptedIOException) {
throw (InterruptedIOException) ex;
}
throw new IOException(e.getMessage());
}
currentNode = null;
final Document ret = document;
document = null;
locator = null;
return ret;
}
}
......@@ -23,7 +23,6 @@ import javax.xml.xpath.XPathFactory;
import org.apache.batik.bridge.BridgeContext;
import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
import org.apache.batik.util.XMLResourceDescriptor;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.geometry.Rectangle;
......@@ -74,8 +73,8 @@ public class SVGFigure extends Figure {
if (uri == null) {
return;
}
final String parser = XMLResourceDescriptor.getXMLParserClassName();
final SAXSVGDocumentFactory factory = new SAXSVGDocumentFactory(parser);
final SAXSVGDocumentFactory factory = new CustomSAXSVGDocumentFactory();
try {
Document document;
if (documentsMap.containsKey(uri)) {
......
......@@ -10,8 +10,8 @@
<name>Bonita Studio</name>
<properties>
<!--forceContextQualifier -->
<tychoVersion>0.21.0</tychoVersion>
<tychoExtrasVersion>0.21.0</tychoExtrasVersion>
<tychoVersion>0.22.0</tychoVersion>
<tychoExtrasVersion>0.22.0</tychoExtrasVersion>
<os-jvm-flags></os-jvm-flags>
<bundle.version>7.2.0-SNAPSHOT</bundle.version>
<ui.designer.version>1.2.8</ui.designer.version>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment