Skip to content

Commit

Permalink
add filename attribute to SclObject
Browse files Browse the repository at this point in the history
  • Loading branch information
marcadetd committed Apr 15, 2022
1 parent 4de4859 commit a0dc693
Show file tree
Hide file tree
Showing 121 changed files with 2,166 additions and 463 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1299,3 +1299,4 @@ _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
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 @@ -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 @@ -348,7 +349,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 a0dc693

Please sign in to comment.