<commit_before>package pipe.views;

import pipe.controllers.PetriNetController;
import pipe.gui.ApplicationSettings;
import pipe.gui.Constants;
import pipe.gui.PetriNetTab;
import pipe.gui.ZoomController;
import pipe.gui.widgets.ArcWeightEditorPanel;
import pipe.gui.widgets.EscapableDialog;
import pipe.handlers.ArcHandler;
import pipe.historyActions.HistoryItem;
import pipe.models.PipeObservable;
import pipe.models.component.Arc;
import pipe.models.component.ArcPoint;
import pipe.models.component.Connectable;
import pipe.views.viewComponents.ArcPath;
import pipe.views.viewComponents.NameLabel;

import javax.swing.*;
import java.awt.geom.Point2D;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.Serializable;
import java.util.List;
import java.util.Observable;
import java.util.Observer;

public abstract class ArcView<S extends Connectable, T extends Connectable>
        extends AbstractPetriNetViewComponent<Arc<S, T>>
        implements Cloneable, Serializable, Observer {


    final protected ArcPath arcPath;
    // bounds of arc need to be grown in order to avoid clipping problems
    final int zoomGrow = 10;
    // true if arc is not hidden when a bidirectional arc is used
    boolean inView = true;
    private boolean _noFunctionalWeights = true;
    /**
     * This is a reference to the petri net tab that this arc is placed on.
     * It is needed to add ArcPoints to the petri net based on the models intermediate
     * points
     */
    protected PetriNetTab tab = null;


    //TODO: DELETE FOR DEBUG ONLY
    public ArcView() {
        super("", "", 0, 0, null, ApplicationSettings.getApplicationController().getActivePetriNetController());
        arcPath = new ArcPath(this, ApplicationSettings.getApplicationController().getActivePetriNetController());
        arcPath.addPoint(new ArcPoint(new Point2D.Double(100, 100), false));
        arcPath.addPoint(new ArcPoint(new Point2D.Double(200, 500), false));
        //        arcPath.createPath();
        //        updateBounds();
    }

    public ArcView(Arc<S, T> model,
                   PetriNetController controller) {
        super(model.getId(), model.getId(), 0, 0, model, controller);
        arcPath = new ArcPath(this, controller);

        updatePath();
        updateBounds();
        addConnectableListener();<commit_msg>Remove debug ctr in ArcView<commit_after>package pipe.views;

import pipe.controllers.PetriNetController;
import pipe.gui.ApplicationSettings;
import pipe.gui.Constants;
import pipe.gui.PetriNetTab;
import pipe.gui.ZoomController;
import pipe.gui.widgets.ArcWeightEditorPanel;
import pipe.gui.widgets.EscapableDialog;
import pipe.handlers.ArcHandler;
import pipe.historyActions.HistoryItem;
import pipe.models.PipeObservable;
import pipe.models.component.Arc;
import pipe.models.component.ArcPoint;
import pipe.models.component.Connectable;
import pipe.views.viewComponents.ArcPath;
import pipe.views.viewComponents.NameLabel;

import javax.swing.*;
import java.awt.geom.Point2D;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.Serializable;
import java.util.List;
import java.util.Observable;
import java.util.Observer;

public abstract class ArcView<S extends Connectable, T extends Connectable>
        extends AbstractPetriNetViewComponent<Arc<S, T>>
        implements Cloneable, Serializable, Observer {


    final protected ArcPath arcPath;
    // bounds of arc need to be grown in order to avoid clipping problems
    final int zoomGrow = 10;
    // true if arc is not hidden when a bidirectional arc is used
    boolean inView = true;
    private boolean _noFunctionalWeights = true;
    /**
     * This is a reference to the petri net tab that this arc is placed on.
     * It is needed to add ArcPoints to the petri net based on the models intermediate
     * points
     */
    protected PetriNetTab tab = null;

    public ArcView(Arc<S, T> model,
                   PetriNetController controller) {
        super(model.getId(), model.getId(), 0, 0, model, controller);
        arcPath = new ArcPath(this, controller);

        updatePath();
        updateBounds();
        addConnectableListener();
{'fraction_non_alphanumeric': 0.08772759517616457, 'fraction_numerical': 0.0061480255379522345, 'mean_word_length': 3.828767123287671, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6532309', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1159, 'n_words': 347}