mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Bug Fixing
This commit is contained in:
parent
7e9807c15f
commit
f4d51f7416
3 changed files with 26 additions and 19 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2004-06-14 Hoda Amer
|
||||||
|
Fix for PR 61043: Accessibility: Code Templates: New Template Pattern field accesskey broken
|
||||||
|
Fix for PR 63388: [Refactoring] items of an enumeration not working
|
||||||
|
|
||||||
2004-06-11 Bogdan Gheorghe
|
2004-06-11 Bogdan Gheorghe
|
||||||
Fix for Bug 66016: Moved search related items from work in progress to search page
|
Fix for Bug 66016: Moved search related items from work in progress to search page
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ import org.eclipse.cdt.core.model.CModelException;
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
import org.eclipse.cdt.core.model.CoreModel;
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
import org.eclipse.cdt.core.model.IEnumeration;
|
import org.eclipse.cdt.core.model.IEnumeration;
|
||||||
|
import org.eclipse.cdt.core.model.IEnumerator;
|
||||||
import org.eclipse.cdt.core.model.IField;
|
import org.eclipse.cdt.core.model.IField;
|
||||||
import org.eclipse.cdt.core.model.IFunction;
|
import org.eclipse.cdt.core.model.IFunction;
|
||||||
import org.eclipse.cdt.core.model.IFunctionDeclaration;
|
import org.eclipse.cdt.core.model.IFunctionDeclaration;
|
||||||
|
@ -160,13 +161,16 @@ public class RenameElementProcessor extends RenameProcessor implements IReferenc
|
||||||
// add the whole signature
|
// add the whole signature
|
||||||
IFunctionDeclaration function = (IFunctionDeclaration)element;
|
IFunctionDeclaration function = (IFunctionDeclaration)element;
|
||||||
name.append(getElementQualifiedName(element.getParent()));
|
name.append(getElementQualifiedName(element.getParent()));
|
||||||
if(name.length() > 0)
|
name.append("::");
|
||||||
name.append("::");
|
|
||||||
name.append(function.getSignature());
|
name.append(function.getSignature());
|
||||||
} else {
|
} else {
|
||||||
name.append(getElementQualifiedName(element.getParent()));
|
if (element instanceof IEnumerator) {
|
||||||
if(name.length() > 0)
|
IEnumeration enum = (IEnumeration) element.getParent();
|
||||||
name.append("::");
|
name.append(getElementQualifiedName(enum.getParent()));
|
||||||
|
}else {
|
||||||
|
name.append(getElementQualifiedName(element.getParent()));
|
||||||
|
}
|
||||||
|
name.append("::");
|
||||||
name.append(element.getElementName());
|
name.append(element.getElementName());
|
||||||
}
|
}
|
||||||
return name.toString();
|
return name.toString();
|
||||||
|
@ -478,6 +482,15 @@ public class RenameElementProcessor extends RenameProcessor implements IReferenc
|
||||||
ICSearchConstants.ENUM, ICSearchConstants.DECLARATIONS, false ));
|
ICSearchConstants.ENUM, ICSearchConstants.DECLARATIONS, false ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(fCElement instanceof IEnumerator){
|
||||||
|
if(updateReferences){
|
||||||
|
orPattern.addPattern(SearchEngine.createSearchPattern( searchPrefix,
|
||||||
|
ICSearchConstants.ENUMTOR, ICSearchConstants.ALL_OCCURRENCES, false ));
|
||||||
|
}else {
|
||||||
|
orPattern.addPattern(SearchEngine.createSearchPattern( searchPrefix,
|
||||||
|
ICSearchConstants.ENUMTOR, ICSearchConstants.DECLARATIONS, false ));
|
||||||
|
}
|
||||||
|
}
|
||||||
else if(fCElement instanceof IField){
|
else if(fCElement instanceof IField){
|
||||||
if(updateReferences){
|
if(updateReferences){
|
||||||
orPattern.addPattern(SearchEngine.createSearchPattern( searchPrefix,
|
orPattern.addPattern(SearchEngine.createSearchPattern( searchPrefix,
|
||||||
|
|
|
@ -278,28 +278,19 @@ public class EditTemplateDialog extends StatusDialog {
|
||||||
createLabel(parent, TemplateMessages.getString("EditTemplateDialog.description")); //$NON-NLS-1$
|
createLabel(parent, TemplateMessages.getString("EditTemplateDialog.description")); //$NON-NLS-1$
|
||||||
fDescriptionText= createText(parent);
|
fDescriptionText= createText(parent);
|
||||||
|
|
||||||
composite= new Composite(parent, SWT.NONE);
|
createLabel(parent, TemplateMessages.getString("EditTemplateDialog.pattern")); //$NON-NLS-1$
|
||||||
composite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
|
|
||||||
layout= new GridLayout();
|
|
||||||
layout.marginWidth= 0;
|
|
||||||
layout.marginHeight= 0;
|
|
||||||
composite.setLayout(layout);
|
|
||||||
|
|
||||||
createLabel(composite, TemplateMessages.getString("EditTemplateDialog.pattern")); //$NON-NLS-1$
|
|
||||||
fPatternEditor= createEditor(parent);
|
fPatternEditor= createEditor(parent);
|
||||||
|
|
||||||
Label filler= new Label(composite, SWT.NONE);
|
fInsertVariableButton= new Button(parent, SWT.NONE);
|
||||||
filler.setLayoutData(new GridData(GridData.FILL_VERTICAL));
|
GridData data = getButtonGridData(fInsertVariableButton);
|
||||||
|
|
||||||
fInsertVariableButton= new Button(composite, SWT.NONE);
|
fInsertVariableButton.setLayoutData(data);
|
||||||
fInsertVariableButton.setLayoutData(getButtonGridData(fInsertVariableButton));
|
|
||||||
fInsertVariableButton.setText(TemplateMessages.getString("EditTemplateDialog.insert.variable")); //$NON-NLS-1$
|
fInsertVariableButton.setText(TemplateMessages.getString("EditTemplateDialog.insert.variable")); //$NON-NLS-1$
|
||||||
fInsertVariableButton.addSelectionListener(new SelectionListener() {
|
fInsertVariableButton.addSelectionListener(new SelectionListener() {
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
fPatternEditor.getTextWidget().setFocus();
|
fPatternEditor.getTextWidget().setFocus();
|
||||||
fPatternEditor.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
|
fPatternEditor.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {}
|
public void widgetDefaultSelected(SelectionEvent e) {}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -315,7 +306,6 @@ public class EditTemplateDialog extends StatusDialog {
|
||||||
private static GridData getButtonGridData(Button button) {
|
private static GridData getButtonGridData(Button button) {
|
||||||
GridData data= new GridData(GridData.FILL_HORIZONTAL);
|
GridData data= new GridData(GridData.FILL_HORIZONTAL);
|
||||||
data.heightHint= SWTUtil.getButtonHeigthHint(button);
|
data.heightHint= SWTUtil.getButtonHeigthHint(button);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue