Adding new tests at runtime?

I am considering using TestStand but need to do the following ; Develope a test sequence or suite that will test a base UUT configuration and deploy this as a test application. The UUT configuration can vary hardware wise. It will sometimes consist of just the base configuration and other times it will take on different forms, but alway contain the base configuration.  I would like to then develope other deployable TestStand tests, that depending on the UUT configuration could at run time be added to suppliment the base configuration tests or could at least be executed as well under programatic control of the original TestStand application. 
In LabWindows I can do this pretty easily with a Plug In type architecture. The base application would support the base UUT tests. If it is discovered at runtime that the UUT is base config plus optional components, the base application will load one of several possible supplemental test DLL's that will programatically add new tests to the base application, inserting them into the test sequence. It can also programatically modify the base apllication UI.
So I guess the question is : Can a deployed TestStand application modify it's test sequence with additional new tests at run time. The new tests would be unknown at the time the TestStand application is built and deployed.
Thanks alot
JeffM

Jeff, I like the idea of using a sub-sequence that uses an expression to load a sequence file.  You would have a main sequence that gets deployed to test the base unit.  In this main sequence you have an expression that creates an array of sequence file names based on the options on the UUT.  Then create a loop around a Call Sequence File step.  This call sequence file is set to dynamically load a file.  I have attached a demo of this method.
To implement this, you would need to come up with a standard for option sequence file names so your main sequence would be able to find them.  A property file with an array of structures that describe each sequence file might work, but this would need to be updated with every new option.  Even better would be a step that can index the sequences in a specific directory and create this array of structures dynamically.  The structure would contain the filename and the option that it tests.
This is something that I put together in about 10 minutes this morning.  The report looks a little ugly...  If you implement any of the above ideas or have improvements please let me know.  This is an interesting set up. 
I am the founder of CnCSoftwareSolutions. When not cleaning up baby drool, I write about test data or work on Vision, a tool for understanding your test data. Visit me at www.cncsoftwaresolutions.com
Attachments:
PlugInDemo.zip ‏18 KB

Similar Messages

  • Adding new objects at runtime

    hi, i'm wondering if i could have everything all set up(canvas3d,simpleuniverse,etc.) and i wanted to add to add a transformgroup to the BranchGroup, would everything update to show the new transformgroup?
    adn is a simepleuniverse like a virtualuniverse?

    i see on Canvas3d there's an update() meathod, do i use that?No, please don`t.
    The scengraph will update if you set the capability
    BranchGroup.ALLOW_CHILDREN_EXTEND
    before you add a new object
    You should update a scengraph from a Behavior. Please see
    You should read the javadoc for Behavior
    When the Java 3D behavior scheduler invokes a Behavior object's processStimulus method, that method may perform any computation it wishes. Usually, it will change its internal state and specify its new wakeup conditions. Most probably, it will manipulate scene graph elements. However, the behavior code can only change those aspects of a scene graph element permitted by the capabilities associated with that scene graph element. A scene graph's capabilities restrict behavioral manipulation to those manipulations explicitly allowed.
    The application must provide the Behavior object with references to those scene graph elements that the Behavior object will manipulate. The application provides those references as arguments to the behavior's constructor when it creates the Behavior object. Alternatively, the Behavior object itself can obtain access to the relevant scene graph elements either when Java 3D invokes its initialize method or each time Java 3D invokes its processStimulus method.
    Behavior methods have a very rigid structure. Java 3D assumes that they always run to completion (if needed, they can spawn threads). Each method's basic structure consists of the following:
    * Code to decode and extract references from the WakeupCondition enumeration that caused the object's awakening.
    * Code to perform the manipulations associated with the WakeupCondition
    * Code to establish this behavior's new WakeupCondition
    * A path to Exit (so that execution returns to the Java 3D behavior scheduler)
    regards

  • Not able to set Weblogic Runtime on eclipse while adding new weblogic srvr

    Hi Everyone,
    I downloaded Oracle Integration pack for eclipse by clicking at "Download additional server adapters". I am not able to set Weblogic Runtime on eclipse while adding new weblogic server.
    I am trying to give following values:
    Name :Oracle WebLogic Server 10gR3 (2)
    Weblogic home :C:\bea\wlserver_10.3
    Java home: C:\bea\jrockit_160_05
    Below it I am getting "No applicable extension found" and finish button is greyed out.
    Please help in telling what is wrong. Never faced such an issue.
    Thanks
    SM

    I found this problem too.
    OS:windows7、eclipse:helios、oepe:Part of Oracle Enterprise Pack for Eclipse 11.1.1.7.3
    <workspace>\.metadata\.log:
    !ENTRY org.eclipse.osgi 2 1 2012-06-05 00:16:06.357
    !MESSAGE NLS unused message: enter_new_hit_count in: org.eclipse.wst.jsdt.debug.internal.ui.messages
    !ENTRY org.eclipse.osgi 2 1 2012-06-05 00:16:06.357
    !MESSAGE NLS unused message: exception_occurred_setting_bp_properties in: org.eclipse.wst.jsdt.debug.internal.ui.messages
    !ENTRY org.eclipse.osgi 2 1 2012-06-05 00:16:06.357
    !MESSAGE NLS unused message: hit_count_must_be_positive in: org.eclipse.wst.jsdt.debug.internal.ui.messages
    !ENTRY org.eclipse.osgi 2 1 2012-06-05 00:16:06.357
    !MESSAGE NLS unused message: no_description_provided in: org.eclipse.wst.jsdt.debug.internal.ui.messages
    !ENTRY org.eclipse.osgi 2 1 2012-06-05 00:16:06.357
    !MESSAGE NLS unused message: scripts in: org.eclipse.wst.jsdt.debug.internal.ui.messages
    !ENTRY org.eclipse.osgi 2 1 2012-06-05 00:16:06.357
    !MESSAGE NLS unused message: select_javascript_file in: org.eclipse.wst.jsdt.debug.internal.ui.messages
    !ENTRY org.eclipse.osgi 2 1 2012-06-05 00:16:06.357
    !MESSAGE NLS unused message: set_bp_hit_count in: org.eclipse.wst.jsdt.debug.internal.ui.messages
    !ENTRY org.eclipse.osgi 2 1 2012-06-05 00:16:06.357
    !MESSAGE NLS unused message: suspend_target in: org.eclipse.wst.jsdt.debug.internal.ui.messages
    !ENTRY org.eclipse.osgi 2 1 2012-06-05 00:16:06.357
    !MESSAGE NLS unused message: suspend_thread in: org.eclipse.wst.jsdt.debug.internal.ui.messages
    !ENTRY org.eclipse.osgi 2 1 2012-06-05 00:16:06.357
    !MESSAGE NLS unused message: the_argument_0_is_not_valid in: org.eclipse.wst.jsdt.debug.internal.ui.messages
    I tried the weblogic 10.3.1、10.3.3、10.3.4、10.3.5 still show the info that "No applicable extension found" and finish button is greyed out.
    What is the reason?
    thanks!

  • [svn:osmf:] 11184: Adding new temporal metadata support, including sample app and unit tests.

    Revision: 11184
    Author:   [email protected]
    Date:     2009-10-27 11:08:21 -0700 (Tue, 27 Oct 2009)
    Log Message:
    Adding new temporal metadata support, including sample app and unit tests.
    Added Paths:
        osmf/trunk/apps/samples/framework/CuePointSample/
        osmf/trunk/apps/samples/framework/CuePointSample/.actionScriptProperties
        osmf/trunk/apps/samples/framework/CuePointSample/.flexProperties
        osmf/trunk/apps/samples/framework/CuePointSample/.project
        osmf/trunk/apps/samples/framework/CuePointSample/html-template/
        osmf/trunk/apps/samples/framework/CuePointSample/html-template/AC_OETags.js
        osmf/trunk/apps/samples/framework/CuePointSample/html-template/history/
        osmf/trunk/apps/samples/framework/CuePointSample/html-template/history/history.css
        osmf/trunk/apps/samples/framework/CuePointSample/html-template/history/history.js
        osmf/trunk/apps/samples/framework/CuePointSample/html-template/history/historyFrame.html
        osmf/trunk/apps/samples/framework/CuePointSample/html-template/index.template.html
        osmf/trunk/apps/samples/framework/CuePointSample/html-template/playerProductInstall.swf
        osmf/trunk/apps/samples/framework/CuePointSample/libs/
        osmf/trunk/apps/samples/framework/CuePointSample/src/
        osmf/trunk/apps/samples/framework/CuePointSample/src/CuePointSample.css
        osmf/trunk/apps/samples/framework/CuePointSample/src/CuePointSample.mxml
        osmf/trunk/framework/MediaFramework/org/osmf/metadata/TemporalFacet.as
        osmf/trunk/framework/MediaFramework/org/osmf/metadata/TemporalFacetEvent.as
        osmf/trunk/framework/MediaFramework/org/osmf/metadata/TemporalIdentifier.as
        osmf/trunk/framework/MediaFramework/org/osmf/video/CuePoint.as
        osmf/trunk/framework/MediaFramework/org/osmf/video/CuePointType.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/metadata/TestTemporalFacet.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/video/TestCuePoint.as

    Greg -
        The metadata sample demonstrates how metadata can be placed on an IMediaResource, and used to  give the framework more information about the resource.  The MediaFactory uses this information to determine which type of media a given resource points to.  One of the intial problems we encountered when creating a media factory that created MediaElements from URLResources, was the inability to distinguish between image, video, and audio urls, since the extension isn't a guaranteed way.
    The Metadata framework, that was developed last sprint was provided to enable metadata such as XMP, Namevalue, and Cuepoints.  Not all specific classes that hold this data haven't been created yet however.  The logic to add metadata automatically hasn't been placed in the framework yet.
    It's currenty possible to retrieve onPlaystatus, onMetadata, onXMPData, onImagedata, and onCuepoint callbacks:
    var videoElement:VideoElement
    [After videoElement loads]
    videoElement.client.addHandler(NetStreamCodes.ON_XMP_DATA, onXMPData);
    function onXMPData(info:Object):void
       //Process XMP here.
    Hope this helps.

  • [svn] 4599: Adding MXUnit tests for MessageFilter runtime configuration.

    Revision: 4599
    Author: [email protected]
    Date: 2009-01-20 11:51:40 -0800 (Tue, 20 Jan 2009)
    Log Message:
    Adding MXUnit tests for MessageFilter runtime configuration.
    CheckInTests: passed
    Modified Paths:
    blazeds/trunk/qa/apps/qa-regress/WEB-INF/flex/remoting-config.mods.xml
    Added Paths:
    blazeds/trunk/qa/apps/qa-regress/WEB-INF/src/blazeds/qa/messagingService/
    blazeds/trunk/qa/apps/qa-regress/WEB-INF/src/blazeds/qa/messagingService/filters/
    blazeds/trunk/qa/apps/qa-regress/WEB-INF/src/blazeds/qa/messagingService/filters/MessageF ilterBrokerConfig.java
    blazeds/trunk/qa/apps/qa-regress/WEB-INF/src/runtimeconfig/filters/TertiaryTestFilter.jav a
    blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/messagefilters/
    blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/messagefilters/ createMessageFilterTest.mxml

    Very impressive!  Thanks for such a fast response.
    But I'm afraid it still doesn't work. After compiling for 10 minutes it couldn't finish:
    ../../dist/lib/libgkconcvs_s.a(nsCanvasRenderingContext2D.o): In function `nsCanvasRenderingContext2D::Destroy()':
    nsCanvasRenderingContext2D.cpp:(.text+0x51e2): undefined reference to `XFreePixmap'
    ../../dist/lib/libgkconcvs_s.a(nsCanvasRenderingContext2D.o): In function `nsCanvasRenderingContext2D::SetDimensions(int, int)':
    nsCanvasRenderingContext2D.cpp:(.text+0x56f6): undefined reference to `XRenderFindStandardFormat'
    nsCanvasRenderingContext2D.cpp:(.text+0x571e): undefined reference to `XListPixmapFormats'
    nsCanvasRenderingContext2D.cpp:(.text+0x575e): undefined reference to `XFree'
    nsCanvasRenderingContext2D.cpp:(.text+0x5796): undefined reference to `XCreatePixmap'
    collect2: ld returned 1 exit status
    make[4]: *** [libgklayout.so] Error 1
    make[4]: Leaving directory `/home/rafael/Builds/lightning/src/mozilla/lightning-obj/layout/build'
    make[3]: *** [libs] Error 2
    make[3]: Leaving directory `/home/rafael/Builds/lightning/src/mozilla/lightning-obj/layout'
    make[2]: *** [tier_9] Error 2
    make[2]: Leaving directory `/home/rafael/Builds/lightning/src/mozilla/lightning-obj'
    make[1]: *** [default] Error 2
    make[1]: Leaving directory `/home/rafael/Builds/lightning/src/mozilla/lightning-obj'
    make: *** [build] Error 2
    ==> ERROR: Build Failed.
    Aborting...
    Hope this helps.

  • TableSorter errors when adding new data

    so here is the deal:
    I am using the TableSorter.java helper class with DefaultTableModel
    from: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    It works great when the data is static and I get it for the first time. however, occationally, when adding new data I get a NullPointerException error.
    in use:
    DefaultTableModel.addRow()
    DefaultTableModel.removeRow() and
    DefaultTableModel.insertRow() methods.
    Error:
    java.lang.ArrayIndexOutOfBoundsException: 5
         at com.shared.model.TableSorter.modelIndex(TableSorter.java:294)
         at com.shared.model.TableSorter.getValueAt(TableSorter.java:340)
         at javax.swing.JTable.getValueAt(Unknown Source)
         at javax.swing.JTable.prepareRenderer(Unknown Source)...
    code problem I:
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        }code problem II:
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        }TableSroter class:
    package com.shared.model;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.List;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    * TableSorter is a decorator for TableModels; adding sorting
    * functionality to a supplied TableModel. TableSorter does
    * not store or copy the data in its TableModel; instead it maintains
    * a map from the row indexes of the view to the row indexes of the
    * model. As requests are made of the sorter (like getValueAt(row, col))
    * they are passed to the underlying model after the row numbers
    * have been translated via the internal mapping array. This way,
    * the TableSorter appears to hold another copy of the table
    * with the rows in a different order.
    * <p/>
    * TableSorter registers itself as a listener to the underlying model,
    * just as the JTable itself would. Events recieved from the model
    * are examined, sometimes manipulated (typically widened), and then
    * passed on to the TableSorter's listeners (typically the JTable).
    * If a change to the model has invalidated the order of TableSorter's
    * rows, a note of this is made and the sorter will resort the
    * rows the next time a value is requested.
    * <p/>
    * When the tableHeader property is set, either by using the
    * setTableHeader() method or the two argument constructor, the
    * table header may be used as a complete UI for TableSorter.
    * The default renderer of the tableHeader is decorated with a renderer
    * that indicates the sorting status of each column. In addition,
    * a mouse listener is installed with the following behavior:
    * <ul>
    * <li>
    * Mouse-click: Clears the sorting status of all other columns
    * and advances the sorting status of that column through three
    * values: {NOT_SORTED, ASCENDING, DESCENDING} (then back to
    * NOT_SORTED again).
    * <li>
    * SHIFT-mouse-click: Clears the sorting status of all other columns
    * and cycles the sorting status of the column through the same
    * three values, in the opposite order: {NOT_SORTED, DESCENDING, ASCENDING}.
    * <li>
    * CONTROL-mouse-click and CONTROL-SHIFT-mouse-click: as above except
    * that the changes to the column do not cancel the statuses of columns
    * that are already sorting - giving a way to initiate a compound
    * sort.
    * </ul>
    * <p/>
    * This is a long overdue rewrite of a class of the same name that
    * first appeared in the swing table demos in 1997.
    * @author Philip Milne
    * @author Brendon McLean
    * @author Dan van Enckevort
    * @author Parwinder Sekhon
    * @version 2.0 02/27/04
    public class TableSorter extends AbstractTableModel
        protected TableModel tableModel;
        public static final int DESCENDING = -1;
        public static final int NOT_SORTED = 0;
        public static final int ASCENDING = 1;
        private static Directive EMPTY_DIRECTIVE = new Directive(-1, NOT_SORTED);
        public static final Comparator COMPARABLE_COMAPRATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return ((Comparable) o1).compareTo(o2);
        public static final Comparator LEXICAL_COMPARATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return o1.toString().compareTo(o2.toString());
        private Row[] viewToModel;
        private int[] modelToView;
        private JTableHeader tableHeader;
        private MouseListener mouseListener;
        private TableModelListener tableModelListener;
        private Map columnComparators = new HashMap();
        private List sortingColumns = new ArrayList();
        public TableSorter()
            this.mouseListener = new MouseHandler();
            this.tableModelListener = new TableModelHandler();
        public TableSorter(TableModel tableModel)
            this();
            setTableModel(tableModel);
        public TableSorter(TableModel tableModel, JTableHeader tableHeader)
            this();
            setTableHeader(tableHeader);
            setTableModel(tableModel);
        private void clearSortingState()
            viewToModel = null;
            modelToView = null;
        public TableModel getTableModel()
            return tableModel;
        public void setTableModel(TableModel tableModel)
            if (this.tableModel != null)
                this.tableModel.removeTableModelListener(tableModelListener);
            this.tableModel = tableModel;
            if (this.tableModel != null)
                this.tableModel.addTableModelListener(tableModelListener);
            clearSortingState();
            fireTableStructureChanged();
        public JTableHeader getTableHeader()
            return tableHeader;
        public void setTableHeader(JTableHeader tableHeader)
            if (this.tableHeader != null)
                this.tableHeader.removeMouseListener(mouseListener);
                TableCellRenderer defaultRenderer = this.tableHeader.getDefaultRenderer();
                if (defaultRenderer instanceof SortableHeaderRenderer)
                    this.tableHeader.setDefaultRenderer(((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
            this.tableHeader = tableHeader;
            if (this.tableHeader != null)
                this.tableHeader.addMouseListener(mouseListener);
                this.tableHeader.setDefaultRenderer
                        new SortableHeaderRenderer(this.tableHeader.getDefaultRenderer())
        public boolean isSorting()
            return sortingColumns.size() != 0;
        private Directive getDirective(int column)
            for (int i = 0; i < sortingColumns.size(); i++)
                Directive directive = (Directive)sortingColumns.get(i);
                if (directive.column == column)
                    return directive;
            return EMPTY_DIRECTIVE;
        public int getSortingStatus(int column)
            return getDirective(column).direction;
        private void sortingStatusChanged()
            clearSortingState();
            fireTableDataChanged();
            if (tableHeader != null)
                tableHeader.repaint();
        public void setSortingStatus(int column, int status)
            Directive directive = getDirective(column);
            if (directive != EMPTY_DIRECTIVE)
                sortingColumns.remove(directive);
            if (status != NOT_SORTED)
                sortingColumns.add(new Directive(column, status));
            sortingStatusChanged();
        protected Icon getHeaderRendererIcon(int column, int size)
            Directive directive = getDirective(column);
            if (directive == EMPTY_DIRECTIVE)
                return null;
            return new Arrow(directive.direction == DESCENDING, size, sortingColumns.indexOf(directive));
        private void cancelSorting()
            sortingColumns.clear();
            sortingStatusChanged();
        public void setColumnComparator(Class type, Comparator comparator)
            if (comparator == null)
                columnComparators.remove(type);
            else
                columnComparators.put(type, comparator);
        protected Comparator getComparator(int column)
            Class columnType = tableModel.getColumnClass(column);
            Comparator comparator = (Comparator) columnComparators.get(columnType);
            if (comparator != null)
                return comparator;
            if (Comparable.class.isAssignableFrom(columnType))
                return COMPARABLE_COMAPRATOR;
            return LEXICAL_COMPARATOR;
        private Row[] getViewToModel()
            if (viewToModel == null)
                int tableModelRowCount = tableModel.getRowCount();
                viewToModel = new Row[tableModelRowCount];
                for (int row = 0; row < tableModelRowCount; row++)
                    viewToModel[row] = new Row(row);
                if (isSorting())
                    Arrays.sort(viewToModel);
            return viewToModel;
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        private int[] getModelToView()
            if (modelToView == null)
                int n = getViewToModel().length;
                modelToView = new int[n];
                for (int i = 0; i < n; i++)
                    modelToView[modelIndex(i)] = i;
            return modelToView;
        // TableModel interface methods
        public int getRowCount()
            return (tableModel == null) ? 0 : tableModel.getRowCount();
        public int getColumnCount()
            return (tableModel == null) ? 0 : tableModel.getColumnCount();
        public String getColumnName(int column)
            return tableModel.getColumnName(column);
        public Class getColumnClass(int column)
            return tableModel.getColumnClass(column);
        public boolean isCellEditable(int row, int column)
            return tableModel.isCellEditable(modelIndex(row), column);
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        public void setValueAt(Object aValue, int row, int column)
            tableModel.setValueAt(aValue, modelIndex(row), column);
        // Helper classes
        private class Row implements Comparable
            private int modelIndex;
            public Row(int index)
                this.modelIndex = index;
            public int compareTo(Object o)
                int row1 = modelIndex;
                int row2 = ((Row) o).modelIndex;
                for (Iterator it = sortingColumns.iterator(); it.hasNext();)
                    Directive directive = (Directive) it.next();
                    int column = directive.column;
                    Object o1 = tableModel.getValueAt(row1, column);
                    Object o2 = tableModel.getValueAt(row2, column);
                    int comparison = 0;
                    // Define null less than everything, except null.
                    if (o1 == null && o2 == null)
                        comparison = 0;
                    } else if (o1 == null)
                        comparison = -1;
                    } else if (o2 == null)
                        comparison = 1;
                    } else {
                        comparison = getComparator(column).compare(o1, o2);
                    if (comparison != 0)
                        return directive.direction == DESCENDING ? -comparison : comparison;
                return 0;
        private class TableModelHandler implements TableModelListener
            public void tableChanged(TableModelEvent e)
                // If we're not sorting by anything, just pass the event along.            
                if (!isSorting())
                    clearSortingState();
                    fireTableChanged(e);
                    return;
                // If the table structure has changed, cancel the sorting; the            
                // sorting columns may have been either moved or deleted from            
                // the model.
                if (e.getFirstRow() == TableModelEvent.HEADER_ROW)
                    cancelSorting();
                    fireTableChanged(e);
                    return;
                // We can map a cell event through to the view without widening            
                // when the following conditions apply:
                // a) all the changes are on one row (e.getFirstRow() == e.getLastRow()) and,
                // b) all the changes are in one column (column != TableModelEvent.ALL_COLUMNS) and,
                // c) we are not sorting on that column (getSortingStatus(column) == NOT_SORTED) and,
                // d) a reverse lookup will not trigger a sort (modelToView != null)
                // Note: INSERT and DELETE events fail this test as they have column == ALL_COLUMNS.
                // The last check, for (modelToView != null) is to see if modelToView
                // is already allocated. If we don't do this check; sorting can become
                // a performance bottleneck for applications where cells 
                // change rapidly in different parts of the table. If cells
                // change alternately in the sorting column and then outside of            
                // it this class can end up re-sorting on alternate cell updates -
                // which can be a performance problem for large tables. The last
                // clause avoids this problem.
                int column = e.getColumn();
                if (e.getFirstRow() == e.getLastRow()
                        && column != TableModelEvent.ALL_COLUMNS
                        && getSortingStatus(column) == NOT_SORTED
                        && modelToView != null)
                    int viewIndex = getModelToView()[e.getFirstRow()];
                    fireTableChanged(new TableModelEvent(TableSorter.this,
                                                         viewIndex, viewIndex,
                                                         column, e.getType()));
                    return;
                // Something has happened to the data that may have invalidated the row order.
                clearSortingState();
                fireTableDataChanged();
                return;
        private class MouseHandler extends MouseAdapter
            public void mouseClicked(MouseEvent e)
                JTableHeader h = (JTableHeader) e.getSource();
                TableColumnModel columnModel = h.getColumnModel();
                int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                int column = columnModel.getColumn(viewColumn).getModelIndex();
                if (column != -1)
                    int status = getSortingStatus(column);
                    if (!e.isControlDown())
                        cancelSorting();
                    // Cycle the sorting states through {NOT_SORTED, ASCENDING, DESCENDING} or
                    // {NOT_SORTED, DESCENDING, ASCENDING} depending on whether shift is pressed.
                    status = status + (e.isShiftDown() ? -1 : 1);
                    status = (status + 4) % 3 - 1; // signed mod, returning {-1, 0, 1}
                    setSortingStatus(column, status);
        private static class Arrow implements Icon
            private boolean descending;
            private int size;
            private int priority;
            public Arrow(boolean descending, int size, int priority)
                this.descending = descending;
                this.size = size;
                this.priority = priority;
            public void paintIcon(Component c, Graphics g, int x, int y)
                Color color = c == null ? Color.GRAY : c.getBackground();            
                // In a compound sort, make each succesive triangle 20%
                // smaller than the previous one.
                int dx = (int)(size/2*Math.pow(0.8, priority));
                int dy = descending ? dx : -dx;
                // Align icon (roughly) with font baseline.
                y = y + 5*size/6 + (descending ? -dy : 0);
                int shift = descending ? 1 : -1;
                g.translate(x, y);
                // Right diagonal.
                g.setColor(color.darker());
                g.drawLine(dx / 2, dy, 0, 0);
                g.drawLine(dx / 2, dy + shift, 0, shift);
                // Left diagonal.
                g.setColor(color.brighter());
                g.drawLine(dx / 2, dy, dx, 0);
                g.drawLine(dx / 2, dy + shift, dx, shift);
                // Horizontal line.
                if (descending) {
                    g.setColor(color.darker().darker());
                } else {
                    g.setColor(color.brighter().brighter());
                g.drawLine(dx, 0, 0, 0);
                g.setColor(color);
                g.translate(-x, -y);
            public int getIconWidth()
                return size;
            public int getIconHeight()
                return size;
        private class SortableHeaderRenderer implements TableCellRenderer
            private TableCellRenderer tableCellRenderer;
            public SortableHeaderRenderer(TableCellRenderer tableCellRenderer)
                this.tableCellRenderer = tableCellRenderer;
            public Component getTableCellRendererComponent(JTable table,
                                                           Object value,
                                                           boolean isSelected,
                                                           boolean hasFocus,
                                                           int row,
                                                           int column)
                Component c = tableCellRenderer.getTableCellRendererComponent(table,
                        value, isSelected, hasFocus, row, column);
                if (c instanceof JLabel) {
                    JLabel l = (JLabel) c;
                    l.setHorizontalTextPosition(JLabel.LEFT);
                    int modelColumn = table.convertColumnIndexToModel(column);
                    l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
                return c;
        private static class Directive
            private int column;
            private int direction;
            public Directive(int column, int direction)
                this.column = column;
                this.direction = direction;
    }any input will be appreciated.
    thanks
    Peter

    The code you posted doesn't help us at all. Its just a duplicate of the code from the tutorial. The custom code is what you have written. For example do you update the TableModel from the Event Thread? Do you update the SortModel or the DefaultTableModel? If you actually provide your test code and somebody has already downloaded the sort classes, then maybe they will test your code against the classes. But I doubt if people will download the sort classes and create a test program just to see if they can duplicate your results (at least I know I'm not about to).

  • Maintaining operating concern after adding new value field

    Hello,
    I added a new value field to our live operating concern,maintained the data structure throguh KEA0(Maintain operating concern).The changes are transported from Development to Quality,Changes were reflected in Q system.After testing in Q system transports were pushed to production system.The new value field is added to the operating concern. When i check the log for KEA0 in production system it displayed one message like:
    Field VV088 was added to the reference structure
    Message no. KE782.You probably either  changed the operating concern or SAP-EIS aspect, and added the field VV099 to the definition.
    The added a CO-PA value field:
    In this case, the field is added to the definition or the summarization levels. This invalidates all existing levels. Consequently, you need to activate them again and fill them with data.
    In production system maintaining operating concenr or KEAO is only in display mode.Is it needed to regenerate the operating concern once again in production, how to do it. Is the message talking about the KEDV summarization levels.?
    thanks
    rahul

    Hi,
    No no ....KEDV is nothing to do here....that is creation of summarization in CO-PA.
    Since you added new value field you necessarily have to Regenerate the operating concern...
    Use Tcode KEA0...go to Environment tab...there the status of Cross client part  and client specific part both will be in RED....now just click on the Cross client (candle button)...now the system would regenerate the operating concern...once it is over do the same for the client specific...
    Beware when you do regenerate the operating concern no body can enter any transaction in that server since it is cross client table ...hence better do it after business hours.
    Hope this helps!
    Running KEDU with rebuild is relevant only when you already have created summarization and called up the same in the CO-PA report "options" tab. If you did not created the summarization you are nothing to do with KEDU.
    Next: The new value field has to be transported to PRD and hence even in PRD we have to do the regeneration manually.
    Regards,
    Velumani
    Message was edited by: Velumani Arunachalam
    Message was edited by: Velumani Arunachalam

  • Impact of adding new value fields in ongoing operating concern.

    Hi All,
    Want to know the steps of adding new value fields in the existing operating concern in COPA?
    What is the overall impact of addition of New Value fields in the running Operating Concern?
    How do we test the addition of new value fields?
    Is the addition of New Value fields to the running Operating Concern advisable?
    Your support and advice is highly anticipated and appreciated.
    Thanks & Regards
    9819528669

    HI,
    please search in SCN forum before you post:
    Re: Adding a ValueField to an existing Operating Concern?
    Best regards, Christian

  • Adding new Node in 10gR2(10.2.0.4) in AIX

    Hi Experts,
    i need your guidence actually we are planning to add new node in our exsisting two node RAC. i need a dacument or refrence links that can guide me in adding new node.
    your help will be very helpfull for me.thanx in advance
    regards,

    Hi,
    you can drive some tests using following docs:
    http://www.smaliz.com/notes/10g-AddNode-RAC-ASM-AIX.pdf
    http://blogs.oracle.com/AlejandroVargas/gems/RAC10gR2AddNode.pdf
    Or refer to the RAC admin books that you can find on http://tahiti.oracle.com/
    HTH,
    Thierry

  • Adding new column to production database

    I have to add a new timestamp column, that defaults to the current date/time, to an existing production database. The table is large - 150M records. I am trying to understand the ramifications of adding a new column to a table this large that gets hit often, mostly with inserts and reads. The column does allow null values and I am not going back and populating existing records with a value. Basically, I am looking for some best practice guidelines - how to prepare, what to expect, what other processes should be followed along with this schema update.

    Radiators wrote:
    Thanks, I have not found any %TYPE or %ROWTYPE dependencies on the table I am altering. But at the same time I do not understand how these types of dependencies would invalidate packages. I wouldn't be breaking any %TYPE dependency because I am not dropping columns, only adding a new one. And according to documentation for %ROWTYPE - "If columns are later added to or dropped from the table, your code can keep working without changes." Can you point me to Oracle documentation that describes your concern in detail? Thanks.you can test it yourself
    SQL> CREATE TABLE abc (c1 NUMBER);
    Table created.
    SQL> INSERT INTO abc
      2       VALUES (99);
    1 row created.
    SQL> CREATE OR REPLACE PROCEDURE test_proc
      2  AS
      3     v   abc%ROWTYPE;
      4  BEGIN
      5     SELECT c1
      6       INTO v
      7       FROM abc
      8       WHERE ROWNUM = 1;
      9  END;
    10  /
    Procedure created.
    SQL> SELECT object_name, status
      2    FROM user_objects
      3   WHERE object_name = 'TEST_PROC';
    OBJECT_NAME                STATUS
    TEST_PROC                    VALID
    SQL> ALTER TABLE abc ADD (c2 VARCHAR2(10));
    Table altered.
    SQL> SELECT object_name, status
      2    FROM user_objects
      3   WHERE object_name = 'TEST_PROC';
    OBJECT_NAME                 STATUS
    TEST_PROC                     INVALID
    SQL> you should also consider the chance that some where if people are using "select * into" using this table, which will fail since you added new column. i don't see any unusual performance bottlenecks by adding a new column. in case of the backups, yes the earlier backups will not have the column. if you restore it, you will see earlier table structure itself. i have one specific question. why are you not attempting this in development/test environment first? even if it is a simple insert, it's always important to do it in test environments before attempting on production db. one thing for sure i know is, after adding column, you will have to recompile all the invalid dependencies. i think, it's better if you attempt it in test db and come up with any issues you see rather than asking a general question where problematic scenarios are plenty and rarely unknown before hand.

  • Adding new hard drive for Flash recovery area

    i am adding new hard drive for flash recovery area. How i can make single directory on that flash recovery area & how i can test that i am accessing that rightly , to that directory & flash back recovery area disk?

    Are you on Windows or Unix? And are you using ASM?
    I'll assume you are on Windows....So after allocating the drive, you will format it say as F drive. Then you can create a directory T:\Flash. The parameter determining the location of the flash recovery area is db_recovery_file_dest. But you also need to set the size of the flash recovery area as well. After that's done. You can do your backups to Flash and see if the directory is populated.

  • [svn:fx-trunk] 10920: Added new file introduced in TLF Build 517.

    Revision: 10920
    Author:   [email protected]
    Date:     2009-10-07 15:27:29 -0700 (Wed, 07 Oct 2009)
    Log Message:
    Added new file introduced in TLF Build 517.
    QE notes: None
    Doc notes: None
    Bugs: None
    Reviewer: None
    Tests run: ant checkintests
    Is noteworthy for integration: No
    Added Paths:
        flex/sdk/trunk/frameworks/projects/textLayout/textLayout_core/src/flashx/textLayout/compo se/ISWFContext.as

    Thats good news.

  • Error in Adding new vritual machine server to HaA cluster ???

    Hi
    when i adding new Server to my cluster i see this error
    Check prerequisites to add server (192.168.20.253) to server pool (karkas) succeed
    2009-11-29 12:16:33     Check prerequisites to add server (192.168.20.253) to server pool (karkas) succeed
    2009-11-29 12:16:46     During adding servers ([192.168.20.253]) to server pool (karkas), Cluster setup failed: (OVM-1011 OVM Manager communication with 192.168.20.254 for operation HA Setup for Oracle VM Agent 2.2.0 failed: errcode=50006, errmsg=Do 'clusterm_init_root_sr' on servers ('192.168.20.253') failed. )
    but when edited again see solved problem but not HA feature work correctly(when shutdown server pool virtual machine is goes down )
    i test is with nfs server but not work i user iscsci target on RHEL5 for create iscsi server
    i see ha work correctly same az this
    2009-11-29 12:25:44     Check prerequisites to add server (192.168.20.253) to server pool (karkas) succeed
    2009-11-29 12:25:50     Check prerequisites to add server (192.168.20.253) to server pool (karkas) succeed
    Select     Server Pool Name     Status     High Availability Status     Servers     Users     Logs
    Select     karkas     Active     Enabled     Total: 2     Total: 1     View Logs
    and no error in /var/log/ovs/*.log
    but when add new server i see in status "error in adding server "" and when edited again see server add and active state
    1-i have no ocfs2 partition on my machine use iscsi initiator
    2-all server use root cluster id /var/ovs/mount/disk_id
    3-all permission set for everybody and 777
    any idea for solve this problem
    thanks

    hi
    and very thanks for your reply
    every this work good
    [root@OVS2-253-32 ~]# service o2cb online
    Starting O2CB cluster ocfs2: OK
    [root@OVS2-253-32 ~]# service o2cb start
    Starting O2CB cluster ocfs2: OK
    [root@OVS2-253-32 ~]#
    but see :
         During adding servers ([192.168.20.253]) to server pool (jojo), Cluster setup failed: (OVM-1011 OVM Manager communication with 192.168.20.254 for operation HA Setup for Oracle VM Agent 2.2.0 failed: errcode=50006, errmsg=Do 'clusterm_init_root_sr' on servers ('192.168.20.253') failed. )
    Select     Server Host/IP     Server Name     Server Type     Status     Server Location     Server Pool Name     Logs
    Select     192.168.20.254     254     Server Pool Master,Utility Server,Virtual Machine Server     Active          jojo     View Logs
    Select     192.168.20.253     253     Virtual Machine Server     Error          jojo     View Logs
    but edit this server work fine. i use doc in step by step configure and no error occur in configuration but still see this error on adding new server and HA can't works correctly (only when i power off virtual quest machine after 15 second this server goes up and live migration not work correctly )when i shutting down one virtual machine server guest still wait for powering up this server
    ocfs2 kernel module load correctly
    cat /var/log/ovs-agent/ovs_root.log
    StackTrace:
    File "/opt/ovs-agent-2.3/OVSXCluster.py", line 115, in clusterm_init_root_sr
    sr.initialize()
    File "/opt/ovs-agent-2.3/_storage/OVSFileSR.py", line 127, in initialize
    self.sp.mount(mp)
    File "/opt/ovs-agent-2.3/_storage/plugins/OVSFileSP.py", line 209, in mount
    fs_spec = self.get_fs_spec()
    File "/opt/ovs-agent-2.3/_storage/plugins/OVSFileSP.py", line 184, in get_fs_spec
    tgt_dev = get_dev_spec(self.fs_uuid, self.fs_spec)
    File "/opt/ovs-agent-2.3/_storage/plugins/OVSFileSP.py", line 82, in get_dev_spec
    raise Exception("No device found: dev_uuid=%s" % dev_uuid)
    are you have any idea for solve this problem ???
    very thanks

  • Adding new feature without recompiling

    i have a question
    i have this program in java that translates one language to another now i want to be able to add another translator later if i required at runtime without recompiling the whole thing.that is i should have the provision of adding new translators feature which i dont know now about, later without compiling.
    if anybody could guide me i will really appreciate that
    thanks

    A factory might do the job if you've organized your existing code properly.
    Assume an interface exists:public interface Translator {
       public String translate(String text);
    }Also suppose you already have a single translator:package my.package;
    public class EnglishToDutchTranslator implements Translator {
       public String translate(String text) {
          return translation;
    }Store this fact in a .properties file or preferences or whereever:ENDU= my.package.EnglishToDutchTranslatorHere's the factory:public final class TranslatorFactory {
       // contains the above name -> tranlator class name mappings
       private static Properties translators;
       // don't instantiate this class
       private TranslatorFactory() { }
       public static Translator getTranslator(String name) {
          String clazz= translators.getProperty(name);
          if (clazz == null) return null;
          try {
             return (Translator)Class.forName(clazz).newInstance();
          catch (Exception e) {
             e.printStackTrace();
             return null;
    }Basically all the factory does is 1) get the fully qualified class name
    given the name of the translator and 2) instantiate an object from that
    class. All that it cares about is that the object implements the Translator
    interface. You can build new translators and register them in that
    properties file. A caller should get a translator as follows:Translater t= TranslatorFactory.getTranslator("ENDU");kind regards,
    Jos

  • Adding new contacts but the requests are not going...

    Hi, 
    Please assist me on this critical issue. I was using latest version of skype that is 7.5 as it upgraded itself many times during the years. I have been adding new connections to my account as i deal with social media websites. Recently i discovered that the contact requests are not going through. 
    I mean the contacts are real and they are active but when i add them to my skype. The request was sent but not delivered actually. I tested that by creating one more personal account. I have sent request from my primary account to the new one. I checked the new account to see if i got the request or not. And yes there was no request. 
    Then i tried sending request from my new account to the primary one. And i got the contact request. Wondering is that issue related to my account or version. I am sure it is not the case with the version because the new account is using the same version too.
    Please let me know. My skype - [Removed for privacy] and I would like to test it with some of your guys here. 

    Thanks everyone.
    It worked when I changed "Point.java" as follows:
    public class Point {
         private int x;
         private int y;
         public int getXCoordinate()
              return x;
         public int getYCoordinate()
              return y;
         public void setXCoordinate(int newX)
              x = newX;
         public void setYCoordinate(int newY)
              y = newY;
         public Point(int x, int y)
              setXCoordinate(x);
              setYCoordinate(y);
    }Edited by: Abder-Rahman on May 8, 2009 1:10 PM

Maybe you are looking for

  • In Elements 7.0, how can I delete multiple photos at the same time?

    In Adobe Photoshop Elements 7.0, how can I delete multiple photos at the same time?   Please be a little specific so I can follow your instructions as I'm not real smart at computers; I'm an intermediate user.  Thank you.

  • Dynamic Number of Column in a table

    Hi guys, I have a requirement that needs dynamic number of column in a tale. It is possible to do this in Adobe forms. Thanks, Chirantan

  • MainStage 2.2.1 - CPU issues with old MacBook

    I just downloaded MainStage 2 for my trusty old MacBook - it's 2.0GHz Core Duo, 2GB... best spec you can make it really. I use it to run both Ableton Live and Garageband with absolutely no problems... The CPU handles both apps fine, unless I have som

  • Saving time information to regions?

    is there a way to set a region to where it will fall in the same timeframe when dragged from the audio window? i deleted some content from my arrange, but the file is still in the audio window and i want to drag it back onto the arrange window and th

  • Create File with access

    I'd like to create a file with just a specific property: enable to read but not to write. How can i manage? Thank for your help.