Skip to content

Commit

Permalink
Merge pull request #29 from riseclipse/add-filename-to-sclobject
Browse files Browse the repository at this point in the history
Add filename to sclobject
  • Loading branch information
marcadetd authored May 27, 2022
2 parents 1357dff + de6fccf commit ba2d2de
Show file tree
Hide file tree
Showing 146 changed files with 2,419 additions and 715 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: fr.centralesupelec.edf.riseclipse.iec61850.scl.edit;singleton:=true
Automatic-Module-Name: fr.centralesupelec.edf.riseclipse.iec61850.scl.edit
Bundle-Version: 1.2.3.qualifier
Bundle-Version: 1.2.4.qualifier
Bundle-ClassPath: .
Bundle-Activator: fr.centralesupelec.edf.riseclipse.iec61850.scl.provider.SCLEditPlugin$Implementation
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: fr.centralesupelec.edf.riseclipse.iec61850.scl.provider
Require-Bundle: org.eclipse.core.runtime,
fr.centralesupelec.edf.riseclipse.iec61850.scl;bundle-version="1.2.3";visibility:=reexport,
fr.centralesupelec.edf.riseclipse.iec61850.scl;bundle-version="1.2.4";visibility:=reexport,
org.eclipse.emf.edit;visibility:=reexport,
fr.centralesupelec.edf.riseclipse.main;bundle-version="1.2.4"
fr.centralesupelec.edf.riseclipse.main;bundle-version="1.2.5"
Bundle-ActivationPolicy: lazy
Original file line number Diff line number Diff line change
Expand Up @@ -1299,5 +1299,6 @@ _UI_LDevice_RefersToLowerLevelLDevices_feature = Refers To Lower Level LDevices
_UI_INamespaceGetter_type = INamespace Getter
_UI_INamespaceGetter_namespace_feature = Namespace
_UI_Private_value_feature = Value
_UI_SclObject_filename_feature = Filename
_UI_MinTime_ParentGSE_feature = Parent GSE
_UI_MaxTime_ParentGSE_feature = Parent GSE
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand Down Expand Up @@ -81,8 +81,9 @@ public Object getImage( Object object ) {
*/
@Override
public String getText( Object object ) {
AccessControl accessControl = ( AccessControl ) object;
return getString( "_UI_AccessControl_type" ) + " " + accessControl.getLineNumber();
String label = ( ( AccessControl ) object ).getFilename();
return label == null || label.length() == 0 ? getString( "_UI_AccessControl_type" )
: getString( "_UI_AccessControl_type" ) + " " + label;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand All @@ -22,6 +22,7 @@

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EStructuralFeature;
Expand Down Expand Up @@ -114,8 +115,9 @@ public Object getImage( Object object ) {
*/
@Override
public String getText( Object object ) {
Address address = ( Address ) object;
return getString( "_UI_Address_type" ) + " " + address.getLineNumber();
String label = ( ( Address ) object ).getFilename();
return label == null || label.length() == 0 ? getString( "_UI_Address_type" )
: getString( "_UI_Address_type" ) + " " + label;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand All @@ -22,6 +22,7 @@

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EStructuralFeature;
Expand Down Expand Up @@ -106,9 +107,9 @@ protected EStructuralFeature getChildFeature( Object object, Object child ) {
*/
@Override
public String getText( Object object ) {
AnyContentFromOtherNamespace anyContentFromOtherNamespace = ( AnyContentFromOtherNamespace ) object;
return getString( "_UI_AnyContentFromOtherNamespace_type" ) + " "
+ anyContentFromOtherNamespace.getLineNumber();
String label = ( ( AnyContentFromOtherNamespace ) object ).getFilename();
return label == null || label.length() == 0 ? getString( "_UI_AnyContentFromOtherNamespace_type" )
: getString( "_UI_AnyContentFromOtherNamespace_type" ) + " " + label;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public Object getImage( Object object ) {
*/
@Override
public String getText( Object object ) {
String label = ( ( AnyLN ) object ).getNamespace();
String label = ( ( AnyLN ) object ).getFilename();
return label == null || label.length() == 0 ? getString( "_UI_AnyLN_type" )
: getString( "_UI_AnyLN_type" ) + " " + label;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand All @@ -22,6 +22,7 @@

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
Expand Down Expand Up @@ -289,7 +290,7 @@ public Object getImage( Object object ) {
*/
@Override
public String getText( Object object ) {
String label = ( ( Association ) object ).getIedName();
String label = ( ( Association ) object ).getFilename();
return label == null || label.length() == 0 ? getString( "_UI_Association_type" )
: getString( "_UI_Association_type" ) + " " + label;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand All @@ -22,6 +22,7 @@

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
Expand Down Expand Up @@ -199,8 +200,9 @@ public Object getImage( Object object ) {
*/
@Override
public String getText( Object object ) {
Authentication authentication = ( Authentication ) object;
return getString( "_UI_Authentication_type" ) + " " + authentication.getLineNumber();
String label = ( ( Authentication ) object ).getFilename();
return label == null || label.length() == 0 ? getString( "_UI_Authentication_type" )
: getString( "_UI_Authentication_type" ) + " " + label;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand All @@ -22,6 +22,7 @@

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EStructuralFeature;
Expand Down Expand Up @@ -117,8 +118,9 @@ public Object getImage( Object object ) {
*/
@Override
public String getText( Object object ) {
BaseElement baseElement = ( BaseElement ) object;
return getString( "_UI_BaseElement_type" ) + " " + baseElement.getLineNumber();
String label = ( ( BaseElement ) object ).getFilename();
return label == null || label.length() == 0 ? getString( "_UI_BaseElement_type" )
: getString( "_UI_BaseElement_type" ) + " " + label;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand All @@ -22,6 +22,7 @@

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
Expand Down Expand Up @@ -153,8 +154,9 @@ public Object getImage( Object object ) {
*/
@Override
public String getText( Object object ) {
BitRateInMbPerSec bitRateInMbPerSec = ( BitRateInMbPerSec ) object;
return getString( "_UI_BitRateInMbPerSec_type" ) + " " + bitRateInMbPerSec.getLineNumber();
String label = ( ( BitRateInMbPerSec ) object ).getFilename();
return label == null || label.length() == 0 ? getString( "_UI_BitRateInMbPerSec_type" )
: getString( "_UI_BitRateInMbPerSec_type" ) + " " + label;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand Down Expand Up @@ -80,8 +80,9 @@ public Object getImage( Object object ) {
*/
@Override
public String getText( Object object ) {
BitRate bitRate = ( BitRate ) object;
return getString( "_UI_BitRate_type" ) + " " + bitRate.getLineNumber();
String label = ( ( BitRate ) object ).getFilename();
return label == null || label.length() == 0 ? getString( "_UI_BitRate_type" )
: getString( "_UI_BitRate_type" ) + " " + label;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand All @@ -25,7 +25,6 @@

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
Expand Down Expand Up @@ -131,7 +130,7 @@ public Object getImage( Object object ) {
*/
@Override
public String getText( Object object ) {
String label = ( ( Cert ) object ).getCommonName();
String label = ( ( Cert ) object ).getFilename();
return label == null || label.length() == 0 ? getString( "_UI_Cert_type" )
: getString( "_UI_Cert_type" ) + " " + label;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand All @@ -22,6 +22,7 @@

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
Expand Down Expand Up @@ -266,7 +267,7 @@ public Object getImage( Object object ) {
*/
@Override
public String getText( Object object ) {
String label = ( ( ClientLN ) object ).getIedName();
String label = ( ( ClientLN ) object ).getFilename();
return label == null || label.length() == 0 ? getString( "_UI_ClientLN_type" )
: getString( "_UI_ClientLN_type" ) + " " + label;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand All @@ -22,6 +22,7 @@

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EStructuralFeature;
Expand Down Expand Up @@ -439,8 +440,7 @@ public Object getImage( Object object ) {
*/
@Override
public String getText( Object object ) {
Boolean labelValue = ( ( ClientServices ) object ).getSupportsLdName();
String label = labelValue == null ? null : labelValue.toString();
String label = ( ( ClientServices ) object ).getFilename();
return label == null || label.length() == 0 ? getString( "_UI_ClientServices_type" )
: getString( "_UI_ClientServices_type" ) + " " + label;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand All @@ -22,6 +22,7 @@

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
Expand Down Expand Up @@ -107,8 +108,9 @@ public Object getImage( Object object ) {
*/
@Override
public String getText( Object object ) {
CommProt commProt = ( CommProt ) object;
return getString( "_UI_CommProt_type" ) + " " + commProt.getLineNumber();
String label = ( ( CommProt ) object ).getFilename();
return label == null || label.length() == 0 ? getString( "_UI_CommProt_type" )
: getString( "_UI_CommProt_type" ) + " " + label;
}

/**
Expand Down
Loading

0 comments on commit ba2d2de

Please sign in to comment.