<commit_before>//========================================================================
// Licensed under the Apache License, Version 2.0 (the "License"); you may not 
// use this file except in compliance with the License.  You may obtain a copy 
// of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software 
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   See the 
// License for the specific language governing permissions and limitations under
// the License.
//======================================================================== 
//
package org.xtuml.bp.ui.explorer.decorators;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IDecoration;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ILightweightLabelDecorator;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.PlatformUI;
import org.xtuml.bp.core.Actiondialect_c;
import org.xtuml.bp.core.CorePlugin;
import org.xtuml.bp.core.Ooaofooa;
import org.xtuml.bp.core.Pref_c;
import org.xtuml.bp.core.Synchronizationtype_c;
import org.xtuml.bp.core.SystemModel_c;
import org.xtuml.bp.core.common.NonRootModelElement;
import org.xtuml.bp.core.ui.actions.PullSynchronizationChanges;

public class SynchronizationDecorator implements ILightweightLabelDecorator {

	private static final ImageDescriptor SYNC_OVERLAY = CorePlugin
			.getImageDescriptor("warning_co.gif");
	public static final String ID = "org.xtuml.bp.ui.explorer.synchronizationDecorator"; //$NON-NLS-1$

	@Override
	public void decorate(Object element, IDecoration decoration) {
		// rather than check the class for the isSynchronizedMethod through
		// reflection, only consider the known classes
		if (!isSynchronized(element)) {
			int  v_dialect = Pref_c.Getactiondialect("bridgepoint_prefs_default_action_language_dialect") ;

			if ( (v_dialect == Actiondialect_c.masl) ) {
				// For MASL projects we automatically synchronize
  			    if (element instanceof SystemModel_c) { 			    	
					SystemModel_c sys = (SystemModel_c) element;
					PullSynchronizationChanges sync = new PullSynchronizationChanges(false, sys);<commit_msg>job #9717 - organize imports<commit_after>//========================================================================
// Licensed under the Apache License, Version 2.0 (the "License"); you may not 
// use this file except in compliance with the License.  You may obtain a copy 
// of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software 
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   See the 
// License for the specific language governing permissions and limitations under
// the License.
//======================================================================== 
//
package org.xtuml.bp.ui.explorer.decorators;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IDecoration;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ILightweightLabelDecorator;
import org.xtuml.bp.core.Actiondialect_c;
import org.xtuml.bp.core.CorePlugin;
import org.xtuml.bp.core.Ooaofooa;
import org.xtuml.bp.core.Pref_c;
import org.xtuml.bp.core.Synchronizationtype_c;
import org.xtuml.bp.core.SystemModel_c;
import org.xtuml.bp.core.common.NonRootModelElement;
import org.xtuml.bp.core.ui.actions.PullSynchronizationChanges;

public class SynchronizationDecorator implements ILightweightLabelDecorator {

	private static final ImageDescriptor SYNC_OVERLAY = CorePlugin
			.getImageDescriptor("warning_co.gif");
	public static final String ID = "org.xtuml.bp.ui.explorer.synchronizationDecorator"; //$NON-NLS-1$

	@Override
	public void decorate(Object element, IDecoration decoration) {
		// rather than check the class for the isSynchronizedMethod through
		// reflection, only consider the known classes
		if (!isSynchronized(element)) {
			int  v_dialect = Pref_c.Getactiondialect("bridgepoint_prefs_default_action_language_dialect") ;

			if ( (v_dialect == Actiondialect_c.masl) ) {
				// For MASL projects we automatically synchronize
  			    if (element instanceof SystemModel_c) { 			    	
					SystemModel_c sys = (SystemModel_c) element;
					PullSynchronizationChanges sync = new PullSynchronizationChanges(false, sys);
{'fraction_non_alphanumeric': 0.14647828797008103, 'fraction_numerical': 0.002908788697278205, 'mean_word_length': 4.849331713244228, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '264854', 'n_tokens_mistral': 1478, 'n_tokens_neox': 1385, 'n_words': 364}