Revision 793

tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/debug/TXMEditorSWTDebugView.java (revision 793)
120 120
				if (inputElement == null) return new Object[0];
121 121
				
122 122
				if (inputElement instanceof TXMEditor) {
123
					return ((TXMEditor)inputElement).getContainer().getChildren();
123
					Object[] o = new Object[1];
124
					o[0] = ((TXMEditor)inputElement).getContainer();
125
					return o;
124 126
				}
125 127
				return null;
126 128
			}
......
140 142
			public final String getText(Object element) {
141 143
				if (element instanceof Composite) {
142 144
					Composite c = (Composite)element;
143
					return c.toString()+" "+c.getLayout() ;
145
					String s = c.toString()+" "+c.getLayout();
146
					if (isHighlighted(c)) s += "*";
147
					return s;
148
				} else if (element instanceof Control) {
149
					Control c = (Control)element;
150
					String s = c.toString();
151
					if (isHighlighted(c)) s += "*";
152
					return s;
144 153
				}
145 154
//				else if (element instanceof Control) {
146 155
//					return ((Composite)element).getLayout().getClass().getSimpleName();
......
157 166
				if (o != null && o instanceof Control) {
158 167
					Control w = (Control) o;
159 168
					Color b = w.getDisplay().getSystemColor(SWT.COLOR_BLUE);
160
					Color current = w.getBackground();
161 169
					
162
					if (current != null 
163
							&& current.getGreen() == b.getGreen()
164
							&& current.getBlue() == b.getBlue()
165
							&& current.getRed() == b.getRed()) {
170
					if (isHighlighted(w)) {
166 171
						w.setBackground(null);
167 172
					} else {
168 173
						w.setBackground(b);
169 174
					}
170
					
171 175
				}
176
				treeViewer.refresh();
172 177
			}
173 178
		});
174 179
	}
......
182 187
		}
183 188
	}
184 189

  
190
	public static boolean isHighlighted(Control c) {
191
		if (c == null) return false;
192
		Color b = c.getDisplay().getSystemColor(SWT.COLOR_BLUE);
193
		Color current = c.getBackground();
194
		
195
		return current != null 
196
				&& current.getGreen() == b.getGreen()
197
				&& current.getBlue() == b.getBlue()
198
				&& current.getRed() == b.getRed();
199
	}
200
	
185 201
	@Override
186 202
	public void propertyChanged(Object source, int propId) { }
187 203

  
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 793)
185 185
			rl = new RowLayout(SWT.HORIZONTAL);
186 186
			rl.marginTop = rl.marginHeight = rl.marginWidth = rl.marginBottom = 0;
187 187
			rl.center = true;
188
			rl.spacing = 0;
188 189
			this.topToolBarContainer.setLayout(rl);
189 190

  
190 191
			this.extendedParametersGroupsComposite = new GLComposite(parent, SWT.NONE);
......
323 324
	 * @param colSpan
324 325
	 */
325 326
	public void initParentLayout(Composite parent, int colSpan)	{
326
		GridLayout gl = new GridLayout();
327
		gl.marginTop = 0;
328
		gl.marginHeight = 0;
329
		gl.marginWidth = 0;
330
		gl.marginBottom = 0;
331
		gl.numColumns = colSpan;
327
		GridLayout gl = GLComposite.createDefaultLayout(1);
332 328
		parent.setLayout(gl);
333 329
	}
334 330

  
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorToolBar.java (revision 793)
192 192
		RowLayout layout = new RowLayout();
193 193
		layout.wrap = true;
194 194
		layout.center = true;
195
		layout.marginWidth = layout.marginBottom = layout.marginHeight = layout.marginTop = 0;
195
		layout.spacing = layout.marginWidth = layout.marginBottom = layout.marginHeight = layout.marginTop = 0;
196 196
		group.setLayout(layout);
197 197

  
198 198
		GridData gd2 = new GridData(GridData.FILL_BOTH);

Also available in: Unified diff