1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/cnd.gdbserver/build.xml Fri Feb 18 15:07:28 2011 -0800
1.3 @@ -0,0 +1,8 @@
1.4 +<?xml version="1.0" encoding="UTF-8"?>
1.5 +<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
1.6 +<!-- for some information on what you could do (e.g. targets to override). -->
1.7 +<!-- If you delete this file and reopen the project it will be recreated. -->
1.8 +<project name="org.netbeans.modules.cnd.debugger.gdbserver" default="netbeans" basedir=".">
1.9 + <description>Builds, tests, and runs the project org.netbeans.modules.cnd.debugger.gdbserver.</description>
1.10 + <import file="nbproject/build-impl.xml"/>
1.11 +</project>
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/cnd.gdbserver/manifest.mf Fri Feb 18 15:07:28 2011 -0800
2.3 @@ -0,0 +1,6 @@
2.4 +Manifest-Version: 1.0
2.5 +OpenIDE-Module: org.netbeans.modules.cnd.debugger.gdbserver
2.6 +OpenIDE-Module-Layer: org/netbeans/modules/cnd/debugger/gdbserver/layer.xml
2.7 +OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/cnd/debugger/gdbserver/Bundle.properties
2.8 +OpenIDE-Module-Specification-Version: 1.0
2.9 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/cnd.gdbserver/nbproject/build-impl.xml Fri Feb 18 15:07:28 2011 -0800
3.3 @@ -0,0 +1,42 @@
3.4 +<?xml version="1.0" encoding="UTF-8"?>
3.5 +<!--
3.6 +*** GENERATED FROM project.xml - DO NOT EDIT ***
3.7 +*** EDIT ../build.xml INSTEAD ***
3.8 +-->
3.9 +<project name="org.netbeans.modules.cnd.debugger.gdbserver-impl" basedir="..">
3.10 + <fail message="Please build using Ant 1.7.1 or higher.">
3.11 + <condition>
3.12 + <not>
3.13 + <antversion atleast="1.7.1"/>
3.14 + </not>
3.15 + </condition>
3.16 + </fail>
3.17 + <property file="nbproject/private/platform-private.properties"/>
3.18 + <property file="nbproject/platform.properties"/>
3.19 + <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
3.20 + <attribute name="name"/>
3.21 + <attribute name="value"/>
3.22 + <sequential>
3.23 + <property name="@{name}" value="${@{value}}"/>
3.24 + </sequential>
3.25 + </macrodef>
3.26 + <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
3.27 + <attribute name="property"/>
3.28 + <attribute name="value"/>
3.29 + <sequential>
3.30 + <property name="@{property}" value="@{value}"/>
3.31 + </sequential>
3.32 + </macrodef>
3.33 + <property file="${user.properties.file}"/>
3.34 + <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
3.35 + <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
3.36 + <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
3.37 + <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
3.38 + <condition>
3.39 + <not>
3.40 + <contains string="${cluster.path.evaluated}" substring="platform"/>
3.41 + </not>
3.42 + </condition>
3.43 + </fail>
3.44 + <import file="${harness.dir}/build.xml"/>
3.45 +</project>
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/cnd.gdbserver/nbproject/genfiles.properties Fri Feb 18 15:07:28 2011 -0800
4.3 @@ -0,0 +1,8 @@
4.4 +build.xml.data.CRC32=36687699
4.5 +build.xml.script.CRC32=e0335d2d
4.6 +build.xml.stylesheet.CRC32=a56c6a5b@1.44.1
4.7 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
4.8 +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
4.9 +nbproject/build-impl.xml.data.CRC32=36687699
4.10 +nbproject/build-impl.xml.script.CRC32=fe464ee1
4.11 +nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.44.1
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/cnd.gdbserver/nbproject/platform.properties Fri Feb 18 15:07:28 2011 -0800
5.3 @@ -0,0 +1,8 @@
5.4 +cluster.path=\
5.5 + ${nbplatform.active.dir}/platform:\
5.6 + ${nbplatform.active.dir}/dlight:\
5.7 + ${nbplatform.active.dir}/cnd:\
5.8 + ${nbplatform.active.dir}/nb:\
5.9 + ${nbplatform.active.dir}/ide:\
5.10 + ${nbplatform.active.dir}/harness
5.11 +nbplatform.active=NetBeans_IDE_CND_Dev
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/cnd.gdbserver/nbproject/project.properties Fri Feb 18 15:07:28 2011 -0800
6.3 @@ -0,0 +1,2 @@
6.4 +javac.source=1.6
6.5 +javac.compilerargs=-Xlint -Xlint:-serial
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/cnd.gdbserver/nbproject/project.xml Fri Feb 18 15:07:28 2011 -0800
7.3 @@ -0,0 +1,56 @@
7.4 +<?xml version="1.0" encoding="UTF-8"?>
7.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
7.6 + <type>org.netbeans.modules.apisupport.project</type>
7.7 + <configuration>
7.8 + <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
7.9 + <code-name-base>org.netbeans.modules.cnd.debugger.gdbserver</code-name-base>
7.10 + <standalone/>
7.11 + <module-dependencies>
7.12 + <dependency>
7.13 + <code-name-base>org.netbeans.modules.cnd.debugger.common2</code-name-base>
7.14 + <build-prerequisite/>
7.15 + <compile-dependency/>
7.16 + <run-dependency>
7.17 + <release-version>3</release-version>
7.18 + <specification-version>3.1.0.3</specification-version>
7.19 + </run-dependency>
7.20 + </dependency>
7.21 + <dependency>
7.22 + <code-name-base>org.netbeans.modules.projectapi</code-name-base>
7.23 + <build-prerequisite/>
7.24 + <compile-dependency/>
7.25 + <run-dependency>
7.26 + <release-version>1</release-version>
7.27 + <specification-version>1.35</specification-version>
7.28 + </run-dependency>
7.29 + </dependency>
7.30 + <dependency>
7.31 + <code-name-base>org.netbeans.spi.debugger.ui</code-name-base>
7.32 + <build-prerequisite/>
7.33 + <compile-dependency/>
7.34 + <run-dependency>
7.35 + <release-version>1</release-version>
7.36 + <specification-version>2.26</specification-version>
7.37 + </run-dependency>
7.38 + </dependency>
7.39 + <dependency>
7.40 + <code-name-base>org.openide.dialogs</code-name-base>
7.41 + <build-prerequisite/>
7.42 + <compile-dependency/>
7.43 + <run-dependency>
7.44 + <specification-version>7.18</specification-version>
7.45 + </run-dependency>
7.46 + </dependency>
7.47 + <dependency>
7.48 + <code-name-base>org.openide.util</code-name-base>
7.49 + <build-prerequisite/>
7.50 + <compile-dependency/>
7.51 + <run-dependency>
7.52 + <specification-version>8.14</specification-version>
7.53 + </run-dependency>
7.54 + </dependency>
7.55 + </module-dependencies>
7.56 + <public-packages/>
7.57 + </data>
7.58 + </configuration>
7.59 +</project>
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/cnd.gdbserver/src/org/netbeans/modules/cnd/debugger/gdbserver/Bundle.properties Fri Feb 18 15:07:28 2011 -0800
8.3 @@ -0,0 +1,11 @@
8.4 +OpenIDE-Module-Display-Category=C/C++
8.5 +OpenIDE-Module-Long-Description=\
8.6 + Support for gdbserver
8.7 +OpenIDE-Module-Name=gdbserver
8.8 +OpenIDE-Module-Short-Description=gdbserver support
8.9 +
8.10 +CTL_GdbServerAttachPanel_name=gdbserver
8.11 +GdbServerAttachPanel.projectLabel.text=Project:
8.12 +GdbServerAttachPanel.jLabel1.text=Host:
8.13 +GdbServerAttachPanel.jLabel2.text=Port:
8.14 +GdbServerAttachPanel.portTF.text=
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/cnd.gdbserver/src/org/netbeans/modules/cnd/debugger/gdbserver/GdbServerAttachPanel.form Fri Feb 18 15:07:28 2011 -0800
9.3 @@ -0,0 +1,94 @@
9.4 +<?xml version="1.0" encoding="UTF-8" ?>
9.5 +
9.6 +<Form version="1.4" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
9.7 + <AuxValues>
9.8 + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
9.9 + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
9.10 + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
9.11 + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
9.12 + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
9.13 + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
9.14 + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
9.15 + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
9.16 + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
9.17 + </AuxValues>
9.18 +
9.19 + <Layout>
9.20 + <DimensionLayout dim="0">
9.21 + <Group type="103" groupAlignment="0" attributes="0">
9.22 + <Group type="102" alignment="0" attributes="0">
9.23 + <Group type="103" groupAlignment="0" attributes="0">
9.24 + <Component id="projectLabel" alignment="0" min="-2" max="-2" attributes="0"/>
9.25 + <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
9.26 + <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
9.27 + </Group>
9.28 + <EmptySpace max="-2" attributes="0"/>
9.29 + <Group type="103" groupAlignment="0" attributes="0">
9.30 + <Component id="portTF" alignment="0" pref="335" max="32767" attributes="0"/>
9.31 + <Component id="hostTF" alignment="0" pref="335" max="32767" attributes="0"/>
9.32 + <Component id="projectCB" alignment="0" pref="335" max="32767" attributes="0"/>
9.33 + </Group>
9.34 + </Group>
9.35 + </Group>
9.36 + </DimensionLayout>
9.37 + <DimensionLayout dim="1">
9.38 + <Group type="103" groupAlignment="0" attributes="0">
9.39 + <Group type="102" alignment="0" attributes="0">
9.40 + <Group type="103" groupAlignment="3" attributes="0">
9.41 + <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
9.42 + <Component id="hostTF" alignment="3" min="-2" max="-2" attributes="0"/>
9.43 + </Group>
9.44 + <EmptySpace max="-2" attributes="0"/>
9.45 + <Group type="103" groupAlignment="3" attributes="0">
9.46 + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
9.47 + <Component id="portTF" alignment="3" min="-2" max="-2" attributes="0"/>
9.48 + </Group>
9.49 + <EmptySpace max="-2" attributes="0"/>
9.50 + <Group type="103" groupAlignment="3" attributes="0">
9.51 + <Component id="projectLabel" alignment="3" min="-2" max="-2" attributes="0"/>
9.52 + <Component id="projectCB" alignment="3" min="-2" max="-2" attributes="0"/>
9.53 + </Group>
9.54 + </Group>
9.55 + </Group>
9.56 + </DimensionLayout>
9.57 + </Layout>
9.58 + <SubComponents>
9.59 + <Component class="javax.swing.JLabel" name="projectLabel">
9.60 + <Properties>
9.61 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
9.62 + <ResourceString bundle="org/netbeans/modules/cnd/debugger/gdb/attach/Bundle.properties" key="GdbServerAttachPanel.projectLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
9.63 + </Property>
9.64 + </Properties>
9.65 + </Component>
9.66 + <Component class="javax.swing.JComboBox" name="projectCB">
9.67 + <Properties>
9.68 + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
9.69 + <StringArray count="0"/>
9.70 + </Property>
9.71 + </Properties>
9.72 + </Component>
9.73 + <Component class="javax.swing.JLabel" name="jLabel1">
9.74 + <Properties>
9.75 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
9.76 + <ResourceString bundle="org/netbeans/modules/cnd/debugger/gdb/attach/Bundle.properties" key="GdbServerAttachPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
9.77 + </Property>
9.78 + </Properties>
9.79 + </Component>
9.80 + <Component class="javax.swing.JTextField" name="hostTF">
9.81 + </Component>
9.82 + <Component class="javax.swing.JLabel" name="jLabel2">
9.83 + <Properties>
9.84 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
9.85 + <ResourceString bundle="org/netbeans/modules/cnd/debugger/gdb/attach/Bundle.properties" key="GdbServerAttachPanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
9.86 + </Property>
9.87 + </Properties>
9.88 + </Component>
9.89 + <Component class="javax.swing.JTextField" name="portTF">
9.90 + <Properties>
9.91 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
9.92 + <ResourceString bundle="org/netbeans/modules/cnd/debugger/gdb/attach/Bundle.properties" key="GdbServerAttachPanel.portTF.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
9.93 + </Property>
9.94 + </Properties>
9.95 + </Component>
9.96 + </SubComponents>
9.97 +</Form>
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/cnd.gdbserver/src/org/netbeans/modules/cnd/debugger/gdbserver/GdbServerAttachPanel.java Fri Feb 18 15:07:28 2011 -0800
10.3 @@ -0,0 +1,200 @@
10.4 +/*
10.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
10.6 + *
10.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
10.8 + *
10.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
10.10 + * Other names may be trademarks of their respective owners.
10.11 + *
10.12 + * The contents of this file are subject to the terms of either the GNU
10.13 + * General Public License Version 2 only ("GPL") or the Common
10.14 + * Development and Distribution License("CDDL") (collectively, the
10.15 + * "License"). You may not use this file except in compliance with the
10.16 + * License. You can obtain a copy of the License at
10.17 + * http://www.netbeans.org/cddl-gplv2.html
10.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
10.19 + * specific language governing permissions and limitations under the
10.20 + * License. When distributing the software, include this License Header
10.21 + * Notice in each file and include the License file at
10.22 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
10.23 + * particular file as subject to the "Classpath" exception as provided
10.24 + * by Oracle in the GPL Version 2 section of the License file that
10.25 + * accompanied this code. If applicable, add the following below the
10.26 + * License Header, with the fields enclosed by brackets [] replaced by
10.27 + * your own identifying information:
10.28 + * "Portions Copyrighted [year] [name of copyright owner]"
10.29 + *
10.30 + * If you wish your version of this file to be governed by only the CDDL
10.31 + * or only the GPL Version 2, indicate your decision by adding
10.32 + * "[Contributor] elects to include this software in this distribution
10.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
10.34 + * single choice of license, a recipient has the option to distribute
10.35 + * your version of this file under either the CDDL, the GPL Version 2 or
10.36 + * to extend the choice of license to its licensees as provided above.
10.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
10.38 + * Version 2 license, then the option applies only if the new code is
10.39 + * made subject to such option by the copyright holder.
10.40 + *
10.41 + * Contributor(s):
10.42 + *
10.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
10.44 + */
10.45 +
10.46 +/*
10.47 + * GdbServerAttachPanel.java
10.48 + *
10.49 + * Created on Aug 14, 2009, 7:39:50 PM
10.50 + */
10.51 +
10.52 +package org.netbeans.modules.cnd.debugger.gdbserver;
10.53 +
10.54 +import java.beans.PropertyChangeListener;
10.55 +import org.netbeans.modules.cnd.debugger.common2.debugger.actions.ExecutableProjectPanel;
10.56 +import org.netbeans.modules.cnd.debugger.common2.debugger.actions.ExecutableProjectPanel.ProjectCBItem;
10.57 +import org.netbeans.spi.debugger.ui.Controller;
10.58 +import org.openide.DialogDisplayer;
10.59 +import org.openide.NotifyDescriptor;
10.60 +import org.openide.util.NbBundle;
10.61 +import org.openide.util.NbPreferences;
10.62 +
10.63 +/**
10.64 + *
10.65 + * @author Egor Ushakov
10.66 + */
10.67 +public class GdbServerAttachPanel extends javax.swing.JPanel {
10.68 + private final Controller controller;
10.69 +
10.70 + private static final String HOST_KEY = "last-gdbserver-host"; //NOI18N
10.71 + private static final String PORT_KEY = "last-gdbserver-port"; //NOI18N
10.72 +
10.73 + /** Creates new form GdbServerAttachPanel */
10.74 + public GdbServerAttachPanel() {
10.75 + controller = new GdbServerAttachController();
10.76 + initComponents();
10.77 + // Fill the Projects combo box
10.78 + ExecutableProjectPanel.fillProjectsCombo(projectCB, null);
10.79 + hostTF.setText(NbPreferences.forModule(GdbServerAttachPanel.class).get(HOST_KEY, "")); //NOI18N
10.80 + portTF.setText(NbPreferences.forModule(GdbServerAttachPanel.class).get(PORT_KEY, "")); //NOI18N
10.81 + }
10.82 +
10.83 + Controller getController() {
10.84 + return controller;
10.85 + }
10.86 +
10.87 + /** This method is called from within the constructor to
10.88 + * initialize the form.
10.89 + * WARNING: Do NOT modify this code. The content of this method is
10.90 + * always regenerated by the Form Editor.
10.91 + */
10.92 + @SuppressWarnings("unchecked")
10.93 + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
10.94 + private void initComponents() {
10.95 +
10.96 + projectLabel = new javax.swing.JLabel();
10.97 + projectCB = new javax.swing.JComboBox();
10.98 + jLabel1 = new javax.swing.JLabel();
10.99 + hostTF = new javax.swing.JTextField();
10.100 + jLabel2 = new javax.swing.JLabel();
10.101 + portTF = new javax.swing.JTextField();
10.102 +
10.103 + projectLabel.setText(org.openide.util.NbBundle.getMessage(GdbServerAttachPanel.class, "GdbServerAttachPanel.projectLabel.text")); // NOI18N
10.104 +
10.105 + jLabel1.setText(org.openide.util.NbBundle.getMessage(GdbServerAttachPanel.class, "GdbServerAttachPanel.jLabel1.text")); // NOI18N
10.106 +
10.107 + jLabel2.setText(org.openide.util.NbBundle.getMessage(GdbServerAttachPanel.class, "GdbServerAttachPanel.jLabel2.text")); // NOI18N
10.108 +
10.109 + portTF.setText(org.openide.util.NbBundle.getMessage(GdbServerAttachPanel.class, "GdbServerAttachPanel.portTF.text")); // NOI18N
10.110 +
10.111 + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
10.112 + this.setLayout(layout);
10.113 + layout.setHorizontalGroup(
10.114 + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
10.115 + .addGroup(layout.createSequentialGroup()
10.116 + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
10.117 + .addComponent(projectLabel)
10.118 + .addComponent(jLabel1)
10.119 + .addComponent(jLabel2))
10.120 + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
10.121 + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
10.122 + .addComponent(portTF, javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
10.123 + .addComponent(hostTF, javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
10.124 + .addComponent(projectCB, 0, 335, Short.MAX_VALUE)))
10.125 + );
10.126 + layout.setVerticalGroup(
10.127 + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
10.128 + .addGroup(layout.createSequentialGroup()
10.129 + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
10.130 + .addComponent(jLabel1)
10.131 + .addComponent(hostTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
10.132 + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
10.133 + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
10.134 + .addComponent(jLabel2)
10.135 + .addComponent(portTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
10.136 + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
10.137 + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
10.138 + .addComponent(projectLabel)
10.139 + .addComponent(projectCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
10.140 + );
10.141 + }// </editor-fold>//GEN-END:initComponents
10.142 +
10.143 +
10.144 + // Variables declaration - do not modify//GEN-BEGIN:variables
10.145 + private javax.swing.JTextField hostTF;
10.146 + private javax.swing.JLabel jLabel1;
10.147 + private javax.swing.JLabel jLabel2;
10.148 + private javax.swing.JTextField portTF;
10.149 + private javax.swing.JComboBox projectCB;
10.150 + private javax.swing.JLabel projectLabel;
10.151 + // End of variables declaration//GEN-END:variables
10.152 +
10.153 + private class GdbServerAttachController implements Controller {
10.154 +
10.155 + @Override
10.156 + public boolean cancel() {
10.157 + return true;
10.158 + }
10.159 +
10.160 + @Override
10.161 + public boolean ok() {
10.162 + String hostValue = hostTF.getText();
10.163 + if (hostValue.length() == 0) {
10.164 + return false;
10.165 + }
10.166 + String portValue = portTF.getText();
10.167 + if (portValue.length() == 0) {
10.168 + return false;
10.169 + }
10.170 +
10.171 + //store last values
10.172 + NbPreferences.forModule(GdbServerAttachPanel.class).put(HOST_KEY, hostValue);
10.173 + NbPreferences.forModule(GdbServerAttachPanel.class).put(PORT_KEY, portValue);
10.174 +
10.175 + ProjectCBItem pi = (ProjectCBItem) projectCB.getSelectedItem();
10.176 + if (pi != null) {
10.177 + String target = hostValue + ':' + portValue;
10.178 +// try {
10.179 +// GdbDebugger.attachGdbServer(target, pi.getProjectInformation());
10.180 +// } catch (DebuggerStartException dse) {
10.181 +// DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(
10.182 +// NbBundle.getMessage(GdbServerAttachPanel.class,
10.183 +// "ERR_UnexpecedAttachGdbServerFailure", target))); // NOI18N
10.184 +// }
10.185 + }
10.186 + return true;
10.187 + }
10.188 +
10.189 + @Override
10.190 + public boolean isValid() {
10.191 + return projectCB.getItemCount() > 0;
10.192 + }
10.193 +
10.194 + @Override
10.195 + public void addPropertyChangeListener(PropertyChangeListener l) {
10.196 + }
10.197 +
10.198 + @Override
10.199 + public void removePropertyChangeListener(PropertyChangeListener l) {
10.200 + }
10.201 +
10.202 + }
10.203 +}
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/cnd.gdbserver/src/org/netbeans/modules/cnd/debugger/gdbserver/GdbServerAttachType.java Fri Feb 18 15:07:28 2011 -0800
11.3 @@ -0,0 +1,74 @@
11.4 +/*
11.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
11.6 + *
11.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
11.8 + *
11.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
11.10 + * Other names may be trademarks of their respective owners.
11.11 + *
11.12 + * The contents of this file are subject to the terms of either the GNU
11.13 + * General Public License Version 2 only ("GPL") or the Common
11.14 + * Development and Distribution License("CDDL") (collectively, the
11.15 + * "License"). You may not use this file except in compliance with the
11.16 + * License. You can obtain a copy of the License at
11.17 + * http://www.netbeans.org/cddl-gplv2.html
11.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
11.19 + * specific language governing permissions and limitations under the
11.20 + * License. When distributing the software, include this License Header
11.21 + * Notice in each file and include the License file at
11.22 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
11.23 + * particular file as subject to the "Classpath" exception as provided
11.24 + * by Oracle in the GPL Version 2 section of the License file that
11.25 + * accompanied this code. If applicable, add the following below the
11.26 + * License Header, with the fields enclosed by brackets [] replaced by
11.27 + * your own identifying information:
11.28 + * "Portions Copyrighted [year] [name of copyright owner]"
11.29 + *
11.30 + * If you wish your version of this file to be governed by only the CDDL
11.31 + * or only the GPL Version 2, indicate your decision by adding
11.32 + * "[Contributor] elects to include this software in this distribution
11.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
11.34 + * single choice of license, a recipient has the option to distribute
11.35 + * your version of this file under either the CDDL, the GPL Version 2 or
11.36 + * to extend the choice of license to its licensees as provided above.
11.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
11.38 + * Version 2 license, then the option applies only if the new code is
11.39 + * made subject to such option by the copyright holder.
11.40 + *
11.41 + * Contributor(s):
11.42 + *
11.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
11.44 + */
11.45 +
11.46 +package org.netbeans.modules.cnd.debugger.gdbserver;
11.47 +
11.48 +import java.lang.ref.Reference;
11.49 +import java.lang.ref.WeakReference;
11.50 +import javax.swing.JComponent;
11.51 +import org.netbeans.spi.debugger.ui.AttachType;
11.52 +import org.netbeans.spi.debugger.ui.Controller;
11.53 +
11.54 +/**
11.55 + *
11.56 + * @author Egor Ushakov
11.57 + */
11.58 +@AttachType.Registration(displayName="#CTL_GdbServerAttachPanel_name")
11.59 +public class GdbServerAttachType extends AttachType {
11.60 + private Reference<GdbServerAttachPanel> customizerRef = new WeakReference<GdbServerAttachPanel>(null);
11.61 +
11.62 + public JComponent getCustomizer () {
11.63 + GdbServerAttachPanel panel = new GdbServerAttachPanel();
11.64 + customizerRef = new WeakReference<GdbServerAttachPanel>(panel);
11.65 + return panel;
11.66 + }
11.67 +
11.68 + @Override
11.69 + public Controller getController() {
11.70 + GdbServerAttachPanel panel = customizerRef.get();
11.71 + if (panel != null) {
11.72 + return panel.getController();
11.73 + } else {
11.74 + return null;
11.75 + }
11.76 + }
11.77 +}
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/cnd.gdbserver/src/org/netbeans/modules/cnd/debugger/gdbserver/layer.xml Fri Feb 18 15:07:28 2011 -0800
12.3 @@ -0,0 +1,3 @@
12.4 +<?xml version="1.0" encoding="UTF-8"?>
12.5 +<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
12.6 +<filesystem/>