use of org.apache.commons.lang.NotImplementedException in project intellij-elixir by KronicDeth.
the class ElixirPsiImplUtil method quote.
@Contract(pure = true)
@NotNull
public static OtpErlangObject quote(PsiElement[] children) {
List<Quotable> quotableList = new LinkedList<Quotable>();
for (int i = 0; i < children.length; i++) {
PsiElement child = children[i];
if (child instanceof Quotable) {
quotableList.add((Quotable) child);
} else if (child instanceof Unquoted) {
continue;
} else {
throw new NotImplementedException("Child, " + child + ", must be Quotable or Unquoted");
}
}
Quotable[] quotableChildren = new Quotable[quotableList.size()];
quotableList.toArray(quotableChildren);
return quote(quotableChildren);
}
use of org.apache.commons.lang.NotImplementedException in project intellij-elixir by KronicDeth.
the class ModuleAttribute method handleElementRename.
@Override
public PsiElement handleElementRename(String newModuleAttributeName) throws IncorrectOperationException {
PsiElement renamedElement = myElement;
if (myElement instanceof AtNonNumericOperation) {
PsiElement moduleAttributeUsage = ElementFactory.createModuleAttributeUsage(myElement.getProject(), newModuleAttributeName);
renamedElement = myElement.replace(moduleAttributeUsage);
} else if (myElement instanceof ElixirAtIdentifier) {
// do nothing; handled by setName on ElixirAtUnqualifiedNoParenthesesCall
} else {
throw new NotImplementedException("Renaming module attribute reference on " + myElement.getClass().getCanonicalName() + " PsiElements is not implemented yet. Please open an issue " + "(https://github.com/KronicDeth/intellij-elixir/issues/new) with the class name and the " + "sample text:\n" + myElement.getText());
}
return renamedElement;
}
use of org.apache.commons.lang.NotImplementedException in project symmetric-ds by JumpMind.
the class DataService method getCsvDataFor.
protected String getCsvDataFor(ISqlTransaction transaction, Trigger trigger, TriggerHistory triggerHistory, String whereClause, boolean pkOnly) {
String data = null;
String sql = null;
try {
if (pkOnly) {
sql = symmetricDialect.createCsvPrimaryKeySql(trigger, triggerHistory, engine.getConfigurationService().getChannel(trigger.getChannelId()), whereClause);
} else {
sql = symmetricDialect.createCsvDataSql(trigger, triggerHistory, engine.getConfigurationService().getChannel(trigger.getChannelId()), whereClause);
}
} catch (NotImplementedException e) {
}
if (isNotBlank(sql)) {
data = transaction.queryForObject(sql, String.class);
} else {
DatabaseInfo databaseInfo = platform.getDatabaseInfo();
String quote = databaseInfo.getDelimiterToken() == null || !parameterService.is(ParameterConstants.DB_DELIMITED_IDENTIFIER_MODE) ? "" : databaseInfo.getDelimiterToken();
sql = "select " + triggerHistory.getColumnNames() + " from " + Table.getFullyQualifiedTableName(triggerHistory.getSourceCatalogName(), triggerHistory.getSourceSchemaName(), triggerHistory.getSourceTableName(), quote, databaseInfo.getCatalogSeparator(), databaseInfo.getSchemaSeparator()) + " t where " + whereClause;
Row row = transaction.queryForRow(sql);
if (row != null) {
data = row.csvValue();
}
}
if (data != null) {
data = data.trim();
}
return data;
}
use of org.apache.commons.lang.NotImplementedException in project iaf by ibissource.
the class JsonDocumentContainer method toString.
protected void toString(StringBuffer sb, Object item, int indentLevel) {
if (item == null) {
sb.append("null");
} else if (item instanceof String) {
sb.append(item);
} else if (item instanceof Map) {
sb.append("{");
if (indentLevel >= 0)
indentLevel++;
for (Entry<String, Object> entry : ((Map<String, Object>) item).entrySet()) {
newLine(sb, indentLevel);
sb.append('"').append(entry.getKey()).append("\": ");
toString(sb, entry.getValue(), indentLevel);
sb.append(",");
}
sb.deleteCharAt(sb.length() - 1);
if (indentLevel >= 0)
indentLevel--;
newLine(sb, indentLevel);
sb.append("}");
} else if (item instanceof List) {
sb.append("[");
if (indentLevel >= 0)
indentLevel++;
for (Object subitem : (List) item) {
newLine(sb, indentLevel);
toString(sb, subitem, indentLevel);
sb.append(",");
}
sb.deleteCharAt(sb.length() - 1);
if (indentLevel >= 0)
indentLevel--;
newLine(sb, indentLevel);
sb.append("]");
} else {
throw new NotImplementedException("cannot handle class [" + item.getClass().getName() + "]");
}
}
use of org.apache.commons.lang.NotImplementedException in project incubator-systemml by apache.
the class Program method clone.
public Program clone(boolean deep) {
if (deep)
throw new NotImplementedException();
Program ret = new Program();
// shallow copy of all program blocks
ret._programBlocks.addAll(_programBlocks);
// functions, which require a deep copy
for (Entry<String, HashMap<String, FunctionProgramBlock>> e1 : _namespaceFunctions.entrySet()) for (Entry<String, FunctionProgramBlock> e2 : e1.getValue().entrySet()) {
FunctionProgramBlock fpb = e2.getValue();
if (fpb instanceof ExternalFunctionProgramBlock)
fpb = createPartialDeepCopy(ret, (ExternalFunctionProgramBlock) fpb);
ret.addFunctionProgramBlock(e1.getKey(), e2.getKey(), fpb);
}
return ret;
}
Aggregations