mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 13:05:22 +02:00
This commit was manufactured by cvs2svn to create branch 'cdt_2_0'.
Cherrypick from master 2004-07-07 20:15:06 UTC Andrew Niefer <aniefer@ca.ibm.com> 'Refactoring pst.TypeInfo for memory performance. see parser.changelog': core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/TemplateParameterTypeInfo.java core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchMatch.java
This commit is contained in:
parent
4b33c0a9ef
commit
4f3559d20d
2 changed files with 75 additions and 0 deletions
|
@ -0,0 +1,36 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2004 IBM Corporation and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* IBM Corporation - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Created on Jul 5, 2004
|
||||||
|
*/
|
||||||
|
package org.eclipse.cdt.internal.core.parser.pst;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author aniefer
|
||||||
|
*/
|
||||||
|
public class TemplateParameterTypeInfo extends TypeInfo {
|
||||||
|
|
||||||
|
public ITypeInfo.eType getTemplateParameterType() {
|
||||||
|
return _templateParameterType;
|
||||||
|
}
|
||||||
|
public void setTemplateParameterType( ITypeInfo.eType type ) {
|
||||||
|
_templateParameterType = type;
|
||||||
|
}
|
||||||
|
public boolean equals( Object t ) {
|
||||||
|
if( !super.equals( t ) ){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return _templateParameterType == ((ITypeInfo)t).getTemplateParameterType();
|
||||||
|
}
|
||||||
|
|
||||||
|
private ITypeInfo.eType _templateParameterType = t_typeName;
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Created on Jun 27, 2004
|
||||||
|
*
|
||||||
|
* TODO To change the template for this generated file go to
|
||||||
|
* Window - Preferences - Java - Code Style - Code Templates
|
||||||
|
*/
|
||||||
|
package org.eclipse.cdt.internal.ui.search;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.search.BasicSearchMatch;
|
||||||
|
import org.eclipse.cdt.core.search.IMatch;
|
||||||
|
import org.eclipse.search.ui.text.Match;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author bgheorgh
|
||||||
|
*
|
||||||
|
* TODO To change the template for this generated type comment go to
|
||||||
|
* Window - Preferences - Java - Code Style - Code Templates
|
||||||
|
*/
|
||||||
|
public class CSearchMatch extends Match {
|
||||||
|
|
||||||
|
private BasicSearchMatch searchMatch;
|
||||||
|
/**
|
||||||
|
* @param element
|
||||||
|
* @param offset
|
||||||
|
* @param length
|
||||||
|
*/
|
||||||
|
public CSearchMatch(Object element, int offset, int length, IMatch match) {
|
||||||
|
super(element, offset, length);
|
||||||
|
if (match instanceof BasicSearchMatch)
|
||||||
|
searchMatch = (BasicSearchMatch)match;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the searchMatch.
|
||||||
|
*/
|
||||||
|
public BasicSearchMatch getSearchMatch() {
|
||||||
|
return searchMatch;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue