Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.Workspace$AccessRecord


                try {
                    _writePending = Thread.currentThread();
                    _director.threadBlocked(_writePending, this,
                            PNDirector.WRITE_BLOCKED);

                    Workspace workspace = getContainer().workspace();
                    workspace.wait(_director);
                } catch (InterruptedException e) {
                    _terminate = true;
                }
            }
View Full Code Here


     */
    public Object clone(Workspace workspace) throws CloneNotSupportedException {
        ExecShellEffigy newObject = (ExecShellEffigy) super.clone(workspace);

        if (_model != null) {
            newObject._model = (NamedObj) _model.clone(new Workspace());
        }

        return newObject;
    }
View Full Code Here

                // Create the class.
                Class newClass = Class.forName(arg);

                // Instantiate the specified class in a new workspace.
                Workspace workspace = new Workspace();

                // Get the constructor that takes a Workspace argument.
                Class[] argTypes = new Class[1];
                argTypes[0] = workspace.getClass();

                Constructor constructor = newClass.getConstructor(argTypes);

                Object[] args = new Object[1];
                args[0] = workspace;
View Full Code Here

    public Object clone(Workspace workspace) throws CloneNotSupportedException {
        PythonShellEffigy newObject = (PythonShellEffigy) super
                .clone(workspace);

        if (_model != null) {
            newObject._model = (NamedObj) _model.clone(new Workspace());
        }

        return newObject;
    }
View Full Code Here

     */
    public Object clone(Workspace workspace) throws CloneNotSupportedException {
        TclShellEffigy newObject = (TclShellEffigy) super.clone(workspace);

        if (_model != null) {
            newObject._model = (NamedObj) _model.clone(new Workspace());
        }

        return newObject;
    }
View Full Code Here

     */
    public Object clone(Workspace workspace) throws CloneNotSupportedException {
        PtolemyEffigy newObject = (PtolemyEffigy) super.clone(workspace);

        if (_model != null && !(_model instanceof Configuration)) {
            newObject._model = (NamedObj) _model.clone(new Workspace());
        }

        return newObject;
    }
View Full Code Here

                NamedObj entity = getEntity("blank");
                Attribute attribute = getAttribute("blank");
                NamedObj newModel;

                if (entity != null) {
                    newModel = (NamedObj) entity.clone(new Workspace());

                    // The cloning process results an object that defers change
                    // requests.  By default, we do not want to defer change
                    // requests, but more importantly, we need to execute
                    // any change requests that may have been queued
                    // during cloning. The following call does that.
                    newModel.setDeferringChangeRequests(false);
                } else if (attribute != null) {
                    newModel = (NamedObj) attribute.clone(new Workspace());

                    // The cloning process results an object that defers change
                    // requests.  By default, we do not want to defer change
                    // requests, but more importantly, we need to execute
                    // any change requests that may have been queued
                    // during cloning. The following call does that.
                    newModel.setDeferringChangeRequests(false);
                } else {
                    newModel = new TypedCompositeActor(new Workspace());
                }

                // The model should have a parser associated with it
                // so that undo works. The following method will create
                // a parser, if there isn't one already.
View Full Code Here

                // Create the class.
                Class newClass = Class.forName(arg);

                // Instantiate the specified class in a new workspace.
                Workspace workspace = new Workspace();

                //Workspace workspace = _configuration.workspace();
                // Get the constructor that takes a Workspace argument.
                Class[] argTypes = new Class[1];
                argTypes[0] = workspace.getClass();

                Constructor constructor = newClass.getConstructor(argTypes);

                Object[] args = new Object[1];
                args[0] = workspace;
View Full Code Here

     *  by the getVersion() method of the workspace of the associated
     *  actor), then reconstruct it. Otherwise, do nothing.
     *  @see ptolemy.kernel.util.Workspace#getVersion()
     */
    protected final void _validate() {
        Workspace workspace = getContainer().workspace();
        long workspaceVersion = workspace.getVersion();

        if (_functionDependencyVersion != workspaceVersion) {
            try {
                workspace.getReadAccess();
                _constructDependencyGraph();
                _functionDependencyVersion = workspaceVersion;
            } finally {
                workspace.doneReading();
            }
        }

        // NOTE: the current design of the version control is
        // to synchronize with the workspace. It is based on the
View Full Code Here

    public Object clone(Workspace workspace) throws CloneNotSupportedException {
        ExpressionShellEffigy newObject = (ExpressionShellEffigy) super
                .clone(workspace);

        if (_model != null) {
            newObject._model = (NamedObj) _model.clone(new Workspace());
        }

        return newObject;
    }
View Full Code Here

TOP

Related Classes of ptolemy.kernel.util.Workspace$AccessRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.