diff options
Diffstat (limited to 'plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/enginecopy/StyleWrapper.java')
-rw-r--r-- | plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/enginecopy/StyleWrapper.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/enginecopy/StyleWrapper.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/enginecopy/StyleWrapper.java index b443f5bf561..7fd646de3b3 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/enginecopy/StyleWrapper.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/enginecopy/StyleWrapper.java @@ -1,7 +1,7 @@ /******************************************************************************* * Copyright (c) 2009 EclipseSource and others. All rights reserved. * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: @@ -18,20 +18,21 @@ import org.w3c.dom.css.CSSStyleDeclaration; * together with all the information needed to calculate a matching selector's * precedence. */ -//Copied from org.eclipse.e4.ui.css.core.impl.dom.StyleWrapper +// Copied from org.eclipse.e4.ui.css.core.impl.dom.StyleWrapper final class StyleWrapper { private static class StyleWrapperComparator implements Comparator<StyleWrapper> { + @Override public int compare(final StyleWrapper wrapper1, final StyleWrapper wrapper2) { int result = 0; - if(wrapper1.specificity > wrapper2.specificity) { + if (wrapper1.specificity > wrapper2.specificity) { result = 1; - } else if(wrapper1.specificity < wrapper2.specificity) { + } else if (wrapper1.specificity < wrapper2.specificity) { result = -1; - } else if(wrapper1.position > wrapper2.position) { + } else if (wrapper1.position > wrapper2.position) { result = 1; - } else if(wrapper1.position < wrapper2.position) { + } else if (wrapper1.position < wrapper2.position) { result = -1; } return result; |